diff options
author | Paul Mundt <lethal@linux-sh.org> | 2010-11-26 02:43:38 -0500 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2010-11-26 02:43:38 -0500 |
commit | c1e0774d74481fdc3082d2096a99a3aa411a71f1 (patch) | |
tree | 14bffea2222c5d01bd77c7dc7dd334e900a96bd4 /drivers/usb | |
parent | 8b32a92b600e2728c5c438a748a4dc3132c98ef3 (diff) |
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 <lethal@linux-sh.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/host/ehci-sh.c | 11 |
1 files changed, 10 insertions, 1 deletions
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) | |||
219 | return 0; | 219 | return 0; |
220 | } | 220 | } |
221 | 221 | ||
222 | static void ehci_hcd_sh_shutdown(struct platform_device *pdev) | ||
223 | { | ||
224 | struct ehci_sh_priv *priv = platform_get_drvdata(pdev); | ||
225 | struct usb_hcd *hcd = priv->hcd; | ||
226 | |||
227 | if (hcd->driver->shutdown) | ||
228 | hcd->driver->shutdown(hcd); | ||
229 | } | ||
230 | |||
222 | static struct platform_driver ehci_hcd_sh_driver = { | 231 | static struct platform_driver ehci_hcd_sh_driver = { |
223 | .probe = ehci_hcd_sh_probe, | 232 | .probe = ehci_hcd_sh_probe, |
224 | .remove = __exit_p(ehci_hcd_sh_remove), | 233 | .remove = __exit_p(ehci_hcd_sh_remove), |
225 | .shutdown = usb_hcd_platform_shutdown, | 234 | .shutdown = ehci_hcd_sh_shutdown, |
226 | .driver = { | 235 | .driver = { |
227 | .name = "sh_ehci", | 236 | .name = "sh_ehci", |
228 | .owner = THIS_MODULE, | 237 | .owner = THIS_MODULE, |