From patchwork Wed Sep 16 00:10:55 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Olof Johansson X-Patchwork-Id: 47783 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n8FNuDo3019771 for ; Tue, 15 Sep 2009 23:56:13 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753630AbZIOXz4 (ORCPT ); Tue, 15 Sep 2009 19:55:56 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753478AbZIOXz4 (ORCPT ); Tue, 15 Sep 2009 19:55:56 -0400 Received: from lixom.net ([66.141.50.11]:36257 "EHLO mail.lixom.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753358AbZIOXz4 (ORCPT ); Tue, 15 Sep 2009 19:55:56 -0400 Received: by mail.lixom.net (Postfix, from userid 999) id 89D0CB78EE; Tue, 15 Sep 2009 19:10:55 -0500 (CDT) Date: Tue, 15 Sep 2009 19:10:55 -0500 From: Olof Johansson To: linux-omap@vger.kernel.org Cc: Felipe Balbi , Tony Lindgren Subject: [PATCH] EHCI USB: Don't use generic shutdown function Message-ID: <20090916001055.GA2449@lixom.net> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org 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 Acked-by: Felipe Balbi --- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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 = {