diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-07-05 15:35:41 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-07-05 15:35:41 -0700 |
commit | ff9cce82772a78983b529e044d85884d3ec95fda (patch) | |
tree | 6491adac0538739a415f7b776d1865ce7ae5d1f7 /drivers/usb/chipidea | |
parent | 933141509cefd64102a943d61d154c5c53bad889 (diff) | |
parent | f8ecf829481b2cc7301a811da9d2df53ef174977 (diff) | |
download | linux-ff9cce82772a78983b529e044d85884d3ec95fda.tar.bz2 |
Merge tag 'xceiv-for-v3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next
usb: phy: patches for v3.6 merge window
We are starting to support multiple USB phys as
we should thanks for Kishon's work. DeviceTree support
for USB PHYs won't come until discussion with DeviceTree
maintainer is finished.
Together with that series, we have one fix for twl4030
which missed a IRQF_ONESHOT annotation when requesting
a threaded IRQ without a top half handler, and removal
of an unused variable compilation warning to isp1301_omap.
Diffstat (limited to 'drivers/usb/chipidea')
-rw-r--r-- | drivers/usb/chipidea/udc.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c index 51f96942dc5e..4688ab71bd27 100644 --- a/drivers/usb/chipidea/udc.c +++ b/drivers/usb/chipidea/udc.c @@ -14,6 +14,7 @@ #include <linux/device.h> #include <linux/dmapool.h> #include <linux/dma-mapping.h> +#include <linux/err.h> #include <linux/init.h> #include <linux/platform_device.h> #include <linux/module.h> @@ -1687,7 +1688,7 @@ static int udc_start(struct ci13xxx *udc) udc->gadget.ep0 = &udc->ep0in->ep; - udc->transceiver = usb_get_transceiver(); + udc->transceiver = usb_get_phy(USB_PHY_TYPE_USB2); if (udc->udc_driver->flags & CI13XXX_REQUIRE_TRANSCEIVER) { if (udc->transceiver == NULL) { @@ -1712,7 +1713,7 @@ static int udc_start(struct ci13xxx *udc) if (retval) goto unreg_device; - if (udc->transceiver) { + if (!IS_ERR_OR_NULL(udc->transceiver)) { retval = otg_set_peripheral(udc->transceiver->otg, &udc->gadget); if (retval) @@ -1729,9 +1730,9 @@ static int udc_start(struct ci13xxx *udc) return retval; remove_trans: - if (udc->transceiver) { + if (!IS_ERR_OR_NULL(udc->transceiver)) { otg_set_peripheral(udc->transceiver->otg, &udc->gadget); - usb_put_transceiver(udc->transceiver); + usb_put_phy(udc->transceiver); } dev_err(dev, "error = %i\n", retval); @@ -1740,8 +1741,8 @@ remove_dbg: unreg_device: device_unregister(&udc->gadget.dev); put_transceiver: - if (udc->transceiver) - usb_put_transceiver(udc->transceiver); + if (!IS_ERR_OR_NULL(udc->transceiver)) + usb_put_phy(udc->transceiver); free_pools: dma_pool_destroy(udc->td_pool); free_qh_pool: @@ -1772,9 +1773,9 @@ static void udc_stop(struct ci13xxx *udc) dma_pool_destroy(udc->td_pool); dma_pool_destroy(udc->qh_pool); - if (udc->transceiver) { + if (!IS_ERR_OR_NULL(udc->transceiver)) { otg_set_peripheral(udc->transceiver->otg, NULL); - usb_put_transceiver(udc->transceiver); + usb_put_phy(udc->transceiver); } dbg_remove_files(&udc->gadget.dev); device_unregister(&udc->gadget.dev); |