aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ehci-fsl.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/host/ehci-fsl.c')
-rw-r--r--drivers/usb/host/ehci-fsl.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c
index 43362577b54a..3379945b095e 100644
--- a/drivers/usb/host/ehci-fsl.c
+++ b/drivers/usb/host/ehci-fsl.c
@@ -142,19 +142,19 @@ static int usb_hcd_fsl_probe(const struct hc_driver *driver,
142 if (pdata->operating_mode == FSL_USB2_DR_OTG) { 142 if (pdata->operating_mode == FSL_USB2_DR_OTG) {
143 struct ehci_hcd *ehci = hcd_to_ehci(hcd); 143 struct ehci_hcd *ehci = hcd_to_ehci(hcd);
144 144
145 ehci->transceiver = usb_get_transceiver(); 145 hcd->phy = usb_get_transceiver();
146 dev_dbg(&pdev->dev, "hcd=0x%p ehci=0x%p, transceiver=0x%p\n", 146 dev_dbg(&pdev->dev, "hcd=0x%p ehci=0x%p, phy=0x%p\n",
147 hcd, ehci, ehci->transceiver); 147 hcd, ehci, hcd->phy);
148 148
149 if (ehci->transceiver) { 149 if (hcd->phy) {
150 retval = otg_set_host(ehci->transceiver->otg, 150 retval = otg_set_host(hcd->phy->otg,
151 &ehci_to_hcd(ehci)->self); 151 &ehci_to_hcd(ehci)->self);
152 if (retval) { 152 if (retval) {
153 usb_put_transceiver(ehci->transceiver); 153 usb_put_transceiver(hcd->phy);
154 goto err4; 154 goto err4;
155 } 155 }
156 } else { 156 } else {
157 dev_err(&pdev->dev, "can't find transceiver\n"); 157 dev_err(&pdev->dev, "can't find phy\n");
158 retval = -ENODEV; 158 retval = -ENODEV;
159 goto err4; 159 goto err4;
160 } 160 }
@@ -190,11 +190,10 @@ static void usb_hcd_fsl_remove(struct usb_hcd *hcd,
190 struct platform_device *pdev) 190 struct platform_device *pdev)
191{ 191{
192 struct fsl_usb2_platform_data *pdata = pdev->dev.platform_data; 192 struct fsl_usb2_platform_data *pdata = pdev->dev.platform_data;
193 struct ehci_hcd *ehci = hcd_to_ehci(hcd);
194 193
195 if (ehci->transceiver) { 194 if (hcd->phy) {
196 otg_set_host(ehci->transceiver->otg, NULL); 195 otg_set_host(hcd->phy->otg, NULL);
197 usb_put_transceiver(ehci->transceiver); 196 usb_put_transceiver(hcd->phy);
198 } 197 }
199 198
200 usb_remove_hcd(hcd); 199 usb_remove_hcd(hcd);