Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d66895f9 authored by Peter Chen's avatar Peter Chen Committed by Greg Kroah-Hartman
Browse files

usb: chipidea: udc: otg_set_peripheral is useless for some chipidea users



It is useless at below cases:
- If we implement both usb host and device at chipidea driver.
- If we don't need phy->otg.

Tested-by: default avatarMarek Vasut <marex@denx.de>
Signed-off-by: default avatarPeter Chen <peter.chen@freescale.com>
Signed-off-by: default avatarAlexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 40ed51a4
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -1805,7 +1805,12 @@ static int udc_start(struct ci_hdrc *ci)
	if (ci->transceiver) {
		retval = otg_set_peripheral(ci->transceiver->otg,
						&ci->gadget);
		if (retval)
		/*
		 * If we implement all USB functions using chipidea drivers,
		 * it doesn't need to call above API, meanwhile, if we only
		 * use gadget function, calling above API is useless.
		 */
		if (retval && retval != -ENOTSUPP)
			goto put_transceiver;
	}