Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c1e0774d authored by Paul Mundt's avatar Paul Mundt
Browse files

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: default avatarPaul Mundt <lethal@linux-sh.org>
parent 8b32a92b
Loading
Loading
Loading
Loading
+10 −1
Original line number Original line Diff line number Diff line
@@ -219,10 +219,19 @@ static int __exit ehci_hcd_sh_remove(struct platform_device *pdev)
	return 0;
	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 = {
static struct platform_driver ehci_hcd_sh_driver = {
	.probe		= ehci_hcd_sh_probe,
	.probe		= ehci_hcd_sh_probe,
	.remove		= __exit_p(ehci_hcd_sh_remove),
	.remove		= __exit_p(ehci_hcd_sh_remove),
	.shutdown	= usb_hcd_platform_shutdown,
	.shutdown	= ehci_hcd_sh_shutdown,
	.driver		= {
	.driver		= {
		.name	= "sh_ehci",
		.name	= "sh_ehci",
		.owner	= THIS_MODULE,
		.owner	= THIS_MODULE,