diff options
author | Peter Chen <peter.chen@freescale.com> | 2013-08-14 05:44:05 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-08-14 15:37:19 -0400 |
commit | d66895f9df6b880fa3a280f5bdfe919169ca37dd (patch) | |
tree | 5ac0d7006b43cfa36f569cfaa59033fb8a0ebbcd /drivers/usb/chipidea | |
parent | 40ed51a4b8588055ccd8e5420c76290659c4c974 (diff) |
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: Marek Vasut <marex@denx.de>
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/chipidea')
-rw-r--r-- | drivers/usb/chipidea/udc.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c index e475fcda1d68..116c76203884 100644 --- a/drivers/usb/chipidea/udc.c +++ b/drivers/usb/chipidea/udc.c | |||
@@ -1805,7 +1805,12 @@ static int udc_start(struct ci_hdrc *ci) | |||
1805 | if (ci->transceiver) { | 1805 | if (ci->transceiver) { |
1806 | retval = otg_set_peripheral(ci->transceiver->otg, | 1806 | retval = otg_set_peripheral(ci->transceiver->otg, |
1807 | &ci->gadget); | 1807 | &ci->gadget); |
1808 | if (retval) | 1808 | /* |
1809 | * If we implement all USB functions using chipidea drivers, | ||
1810 | * it doesn't need to call above API, meanwhile, if we only | ||
1811 | * use gadget function, calling above API is useless. | ||
1812 | */ | ||
1813 | if (retval && retval != -ENOTSUPP) | ||
1809 | goto put_transceiver; | 1814 | goto put_transceiver; |
1810 | } | 1815 | } |
1811 | 1816 | ||