aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ehci-mxc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/host/ehci-mxc.c')
-rw-r--r--drivers/usb/host/ehci-mxc.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/drivers/usb/host/ehci-mxc.c b/drivers/usb/host/ehci-mxc.c
index e4c34ac386c0..0528dc4526c8 100644
--- a/drivers/usb/host/ehci-mxc.c
+++ b/drivers/usb/host/ehci-mxc.c
@@ -49,7 +49,7 @@ static const struct ehci_driver_overrides ehci_mxc_overrides __initconst = {
49 49
50static int ehci_mxc_drv_probe(struct platform_device *pdev) 50static int ehci_mxc_drv_probe(struct platform_device *pdev)
51{ 51{
52 struct mxc_usbh_platform_data *pdata = pdev->dev.platform_data; 52 struct mxc_usbh_platform_data *pdata = dev_get_platdata(&pdev->dev);
53 struct usb_hcd *hcd; 53 struct usb_hcd *hcd;
54 struct resource *res; 54 struct resource *res;
55 int irq, ret; 55 int irq, ret;
@@ -174,7 +174,7 @@ err_alloc:
174 174
175static int ehci_mxc_drv_remove(struct platform_device *pdev) 175static int ehci_mxc_drv_remove(struct platform_device *pdev)
176{ 176{
177 struct mxc_usbh_platform_data *pdata = pdev->dev.platform_data; 177 struct mxc_usbh_platform_data *pdata = dev_get_platdata(&pdev->dev);
178 struct usb_hcd *hcd = platform_get_drvdata(pdev); 178 struct usb_hcd *hcd = platform_get_drvdata(pdev);
179 struct ehci_hcd *ehci = hcd_to_ehci(hcd); 179 struct ehci_hcd *ehci = hcd_to_ehci(hcd);
180 struct ehci_mxc_priv *priv = (struct ehci_mxc_priv *) ehci->priv; 180 struct ehci_mxc_priv *priv = (struct ehci_mxc_priv *) ehci->priv;
@@ -184,7 +184,7 @@ static int ehci_mxc_drv_remove(struct platform_device *pdev)
184 if (pdata && pdata->exit) 184 if (pdata && pdata->exit)
185 pdata->exit(pdev); 185 pdata->exit(pdev);
186 186
187 if (pdata->otg) 187 if (pdata && pdata->otg)
188 usb_phy_shutdown(pdata->otg); 188 usb_phy_shutdown(pdata->otg);
189 189
190 clk_disable_unprepare(priv->usbclk); 190 clk_disable_unprepare(priv->usbclk);
@@ -197,20 +197,12 @@ static int ehci_mxc_drv_remove(struct platform_device *pdev)
197 return 0; 197 return 0;
198} 198}
199 199
200static void ehci_mxc_drv_shutdown(struct platform_device *pdev)
201{
202 struct usb_hcd *hcd = platform_get_drvdata(pdev);
203
204 if (hcd->driver->shutdown)
205 hcd->driver->shutdown(hcd);
206}
207
208MODULE_ALIAS("platform:mxc-ehci"); 200MODULE_ALIAS("platform:mxc-ehci");
209 201
210static struct platform_driver ehci_mxc_driver = { 202static struct platform_driver ehci_mxc_driver = {
211 .probe = ehci_mxc_drv_probe, 203 .probe = ehci_mxc_drv_probe,
212 .remove = ehci_mxc_drv_remove, 204 .remove = ehci_mxc_drv_remove,
213 .shutdown = ehci_mxc_drv_shutdown, 205 .shutdown = usb_hcd_platform_shutdown,
214 .driver = { 206 .driver = {
215 .name = "mxc-ehci", 207 .name = "mxc-ehci",
216 }, 208 },