The OMAP EHCI glue code has a layer of driver state struct between
the platform_device and usb_hcd. So it can't use the generic
usb_hcd_platform_shutdown.

This fixes a panic at reboot time.


Signed-off-by: Olof Johansson <[email protected]>

diff --git a/drivers/usb/host/ehci-omap.c b/drivers/usb/host/ehci-omap.c
index 8f8f022..bca3f0c 100644
--- a/drivers/usb/host/ehci-omap.c
+++ b/drivers/usb/host/ehci-omap.c
@@ -701,10 +701,19 @@ static int ehci_hcd_omap_remove(struct platform_device 
*pdev)
        return 0;
 }
 
+static void ehci_hcd_omap_shutdown(struct platform_device *pdev)
+{
+       struct ehci_hcd_omap *omap = platform_get_drvdata(pdev);
+       struct usb_hcd *hcd = ehci_to_hcd(omap->ehci);
+
+       if (hcd->driver->shutdown)
+               hcd->driver->shutdown(hcd);
+}
+
 static struct platform_driver ehci_hcd_omap_driver = {
        .probe                  = ehci_hcd_omap_probe,
        .remove                 = ehci_hcd_omap_remove,
-       .shutdown               = usb_hcd_platform_shutdown,
+       .shutdown               = ehci_hcd_omap_shutdown,
        /*.suspend              = ehci_hcd_omap_suspend, */
        /*.resume               = ehci_hcd_omap_resume, */
        .driver = {
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to