aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ehci-fsl.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-07-05 18:35:41 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-07-05 18:35:41 -0400
commitff9cce82772a78983b529e044d85884d3ec95fda (patch)
tree6491adac0538739a415f7b776d1865ce7ae5d1f7 /drivers/usb/host/ehci-fsl.c
parent933141509cefd64102a943d61d154c5c53bad889 (diff)
parentf8ecf829481b2cc7301a811da9d2df53ef174977 (diff)
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.c11
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 @@
27#include <linux/types.h> 27#include <linux/types.h>
28#include <linux/delay.h> 28#include <linux/delay.h>
29#include <linux/pm.h> 29#include <linux/pm.h>
30#include <linux/err.h>
30#include <linux/platform_device.h> 31#include <linux/platform_device.h>
31#include <linux/fsl_devices.h> 32#include <linux/fsl_devices.h>
32 33
@@ -142,15 +143,15 @@ static int usb_hcd_fsl_probe(const struct hc_driver *driver,
142 if (pdata->operating_mode == FSL_USB2_DR_OTG) { 143 if (pdata->operating_mode == FSL_USB2_DR_OTG) {
143 struct ehci_hcd *ehci = hcd_to_ehci(hcd); 144 struct ehci_hcd *ehci = hcd_to_ehci(hcd);
144 145
145 hcd->phy = usb_get_transceiver(); 146 hcd->phy = usb_get_phy(USB_PHY_TYPE_USB2);
146 dev_dbg(&pdev->dev, "hcd=0x%p ehci=0x%p, phy=0x%p\n", 147 dev_dbg(&pdev->dev, "hcd=0x%p ehci=0x%p, phy=0x%p\n",
147 hcd, ehci, hcd->phy); 148 hcd, ehci, hcd->phy);
148 149
149 if (hcd->phy) { 150 if (!IS_ERR_OR_NULL(hcd->phy)) {
150 retval = otg_set_host(hcd->phy->otg, 151 retval = otg_set_host(hcd->phy->otg,
151 &ehci_to_hcd(ehci)->self); 152 &ehci_to_hcd(ehci)->self);
152 if (retval) { 153 if (retval) {
153 usb_put_transceiver(hcd->phy); 154 usb_put_phy(hcd->phy);
154 goto err4; 155 goto err4;
155 } 156 }
156 } else { 157 } else {
@@ -191,9 +192,9 @@ static void usb_hcd_fsl_remove(struct usb_hcd *hcd,
191{ 192{
192 struct fsl_usb2_platform_data *pdata = pdev->dev.platform_data; 193 struct fsl_usb2_platform_data *pdata = pdev->dev.platform_data;
193 194
194 if (hcd->phy) { 195 if (!IS_ERR_OR_NULL(hcd->phy)) {
195 otg_set_host(hcd->phy->otg, NULL); 196 otg_set_host(hcd->phy->otg, NULL);
196 usb_put_transceiver(hcd->phy); 197 usb_put_phy(hcd->phy);
197 } 198 }
198 199
199 usb_remove_hcd(hcd); 200 usb_remove_hcd(hcd);