Skip to content

Commit

Permalink
usb: ehci-sh: Fix up fault in shutdown path.
Browse files Browse the repository at this point in the history
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 <lethal@linux-sh.org>
  • Loading branch information
Paul Mundt committed Nov 26, 2010
1 parent 8b32a92 commit c1e0774
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion drivers/usb/host/ehci-sh.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit c1e0774

Please sign in to comment.