diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-07-06 00:35:41 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-07-06 00:35:41 +0200 |
commit | ff9cce82772a78983b529e044d85884d3ec95fda (patch) | |
tree | 6491adac0538739a415f7b776d1865ce7ae5d1f7 /drivers/usb/host/ehci-fsl.c | |
parent | Merge tag 'dwc3-for-v3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/ba... (diff) | |
parent | usb: phy: fix error handling in usb_get_phy (diff) | |
download | linux-ff9cce82772a78983b529e044d85884d3ec95fda.tar.xz linux-ff9cce82772a78983b529e044d85884d3ec95fda.zip |
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/host/ehci-fsl.c')
-rw-r--r-- | drivers/usb/host/ehci-fsl.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c index 3379945b095e..74914de8b9bf 100644 --- a/drivers/usb/host/ehci-fsl.c +++ b/drivers/usb/host/ehci-fsl.c @@ -27,6 +27,7 @@ #include <linux/types.h> #include <linux/delay.h> #include <linux/pm.h> +#include <linux/err.h> #include <linux/platform_device.h> #include <linux/fsl_devices.h> @@ -142,15 +143,15 @@ static int usb_hcd_fsl_probe(const struct hc_driver *driver, if (pdata->operating_mode == FSL_USB2_DR_OTG) { struct ehci_hcd *ehci = hcd_to_ehci(hcd); - hcd->phy = usb_get_transceiver(); + hcd->phy = usb_get_phy(USB_PHY_TYPE_USB2); dev_dbg(&pdev->dev, "hcd=0x%p ehci=0x%p, phy=0x%p\n", hcd, ehci, hcd->phy); - if (hcd->phy) { + if (!IS_ERR_OR_NULL(hcd->phy)) { retval = otg_set_host(hcd->phy->otg, &ehci_to_hcd(ehci)->self); if (retval) { - usb_put_transceiver(hcd->phy); + usb_put_phy(hcd->phy); goto err4; } } else { @@ -191,9 +192,9 @@ static void usb_hcd_fsl_remove(struct usb_hcd *hcd, { struct fsl_usb2_platform_data *pdata = pdev->dev.platform_data; - if (hcd->phy) { + if (!IS_ERR_OR_NULL(hcd->phy)) { otg_set_host(hcd->phy->otg, NULL); - usb_put_transceiver(hcd->phy); + usb_put_phy(hcd->phy); } usb_remove_hcd(hcd); |