Skip to contentSkip to conversation

EHCI USB: Don't use generic shutdown function

PATCH In review Olof Johansson 3 participants 3 messages Sep 15, 2009 – Sep 22, 2009

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 EHCI USB: Don't use generic shutdown function

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.

drivers/usb/host/ehci-omap.c +10 -1
index 8f8f022..bca3f0c 100644
@@ -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 = {
#2 lore raw

PATCH 1/1 EHCI USB: Don't use generic shutdown function

In reply to Olof Johansson

This patch has been applied to the linux-omap
by youw fwiendly patch wobot.

Branch in linux-omap: ehci

Initial commit ID (Likely to change): 53e4096a17681ef7cd1ad0d97a55c9df51898594

PatchWorks
http://patchwork.kernel.org/patch/47783/

Git (Likely to change, and takes a while to get mirrored)
http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap-2.6.git;a=commit;h=53e4096a17681ef7cd1ad0d97a55c9df51898594