From: Paul Mundt Date: Fri, 26 Nov 2010 07:43:38 +0000 (+0900) Subject: usb: ehci-sh: Fix up fault in shutdown path. X-Git-Tag: v2.6.38-rc1~465^2~11^2~30^2~2 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=c1e0774d74481fdc3082d2096a99a3aa411a71f1;p=karo-tx-linux.git usb: ehci-sh: Fix up fault in shutdown path. We can't use the generic usb_hcd_platform_shutdown helper on account of the fact we don't stash the hcd pointer in the driver data, so we provide our own shutdown handler. Signed-off-by: Paul Mundt --- diff --git a/drivers/usb/host/ehci-sh.c b/drivers/usb/host/ehci-sh.c index 430b72e637fd..9d3a29f8ced5 100644 --- a/drivers/usb/host/ehci-sh.c +++ b/drivers/usb/host/ehci-sh.c @@ -219,10 +219,19 @@ static int __exit ehci_hcd_sh_remove(struct platform_device *pdev) return 0; } +static void ehci_hcd_sh_shutdown(struct platform_device *pdev) +{ + struct ehci_sh_priv *priv = platform_get_drvdata(pdev); + struct usb_hcd *hcd = priv->hcd; + + if (hcd->driver->shutdown) + hcd->driver->shutdown(hcd); +} + static struct platform_driver ehci_hcd_sh_driver = { .probe = ehci_hcd_sh_probe, .remove = __exit_p(ehci_hcd_sh_remove), - .shutdown = usb_hcd_platform_shutdown, + .shutdown = ehci_hcd_sh_shutdown, .driver = { .name = "sh_ehci", .owner = THIS_MODULE,