public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Olof Johansson <olof@lixom.net>
To: linux-omap@vger.kernel.org
Cc: Felipe Balbi <me@felipebalbi.com>, Tony Lindgren <tony@atomide.com>
Subject: [PATCH] EHCI USB: Don't use generic shutdown function
Date: Tue, 15 Sep 2009 19:10:55 -0500	[thread overview]
Message-ID: <20090916001055.GA2449@lixom.net> (raw)

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.


Signed-off-by: Olof Johansson <olof@lixom.net>

diff --git a/drivers/usb/host/ehci-omap.c b/drivers/usb/host/ehci-omap.c
index 8f8f022..bca3f0c 100644
--- a/drivers/usb/host/ehci-omap.c
+++ b/drivers/usb/host/ehci-omap.c
@@ -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 = {

             reply	other threads:[~2009-09-15 23:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-16  0:10 Olof Johansson [this message]
2009-09-16  6:39 ` [PATCH] EHCI USB: Don't use generic shutdown function Felipe Balbi
2009-09-22  1:14 ` [APPLIED] [PATCH] EHCI USB: Don&#39;t " Tony Lindgren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090916001055.GA2449@lixom.net \
    --to=olof@lixom.net \
    --cc=linux-omap@vger.kernel.org \
    --cc=me@felipebalbi.com \
    --cc=tony@atomide.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox