From mboxrd@z Thu Jan 1 00:00:00 1970 From: Felipe Balbi Subject: [PATCH 5/7] usb: dwc3: omap: fix order of pm_runtime vs child removal Date: Thu, 12 Dec 2013 15:38:43 -0600 Message-ID: <1386884325-11440-6-git-send-email-balbi@ti.com> References: <1386884325-11440-1-git-send-email-balbi@ti.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: In-Reply-To: <1386884325-11440-1-git-send-email-balbi-l0cyMroinI0@public.gmane.org> Sender: linux-usb-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Linux USB Mailing List Cc: kgene.kim-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org, Linux ARM Kernel Mailing List , linux-samsung-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Linux OMAP Mailing List , w-kwok2-l0cyMroinI0@public.gmane.org, Santosh Shilimkar , Felipe Balbi List-Id: linux-omap@vger.kernel.org pm_runtime_put_sync() will kill dwc3's clocks and, since dwc3 core accesses registers during removal, we must make sure to unregister core before disabling clocks and pm_runtime. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/dwc3-omap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/dwc3/dwc3-omap.c b/drivers/usb/dwc3/dwc3-omap.c index 076bb28..a9090a1 100644 --- a/drivers/usb/dwc3/dwc3-omap.c +++ b/drivers/usb/dwc3/dwc3-omap.c @@ -580,9 +580,9 @@ static int dwc3_omap_remove(struct platform_device *pdev) if (omap->extcon_id_dev.edev) extcon_unregister_interest(&omap->extcon_id_dev); dwc3_omap_disable_irqs(omap); + device_for_each_child(&pdev->dev, NULL, dwc3_omap_remove_core); pm_runtime_put_sync(&pdev->dev); pm_runtime_disable(&pdev->dev); - device_for_each_child(&pdev->dev, NULL, dwc3_omap_remove_core); return 0; } -- 1.8.4.GIT -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html