From patchwork Thu Feb 27 19:49:54 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 25475 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qg0-f72.google.com (mail-qg0-f72.google.com [209.85.192.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 5BA4A20543 for ; Thu, 27 Feb 2014 19:51:47 +0000 (UTC) Received: by mail-qg0-f72.google.com with SMTP id q107sf5461858qgd.3 for ; Thu, 27 Feb 2014 11:51:47 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe:content-type; bh=fU39atydkrH2CVkptO+GCaVIrxk3Y8mvVIdw4rw15u4=; b=guhhbQx5BkODbK8kH4FNOcWAfTnxWM8p0xuMClW/JrJ57w/RvkEcMStR1fVeM6PgJv xLgbTxLJo+eMYsvNCRh6O3OsMye2ltiU9p/jR6xvT3yZyGIYPfomsEmIj86iKMVUieug WPXBas5d50PnYU/Xk442wXfs4UHQtgA5FKLbyv2D6Rie8uljncJVcM3oUG5j27qgGLW2 U3r9N8M5JHJFvbIIduv53Ismj7JSyEmnh7R0OJAmvF5o/U/E0Dgd8JDS2fGSguNjLNcZ d6GQTW5Drb1Bva2Ls1RGeR0E/T7rt6XOL19uSRWPlU0nkCel64tGbW8DlpcnU9FA78OO mbVg== X-Gm-Message-State: ALoCoQmGqetZgeubEE0KmifG2pLYUPUFPsoFX4Yqy3FI6Iut/ksFYs6sLRY6yQA7qFCMP6TIMUrO X-Received: by 10.236.4.136 with SMTP id 8mr4746186yhj.21.1393530707162; Thu, 27 Feb 2014 11:51:47 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.84.239 with SMTP id l102ls854331qgd.5.gmail; Thu, 27 Feb 2014 11:51:47 -0800 (PST) X-Received: by 10.220.191.134 with SMTP id dm6mr12311979vcb.16.1393530707016; Thu, 27 Feb 2014 11:51:47 -0800 (PST) Received: from mail-vc0-f178.google.com (mail-vc0-f178.google.com [209.85.220.178]) by mx.google.com with ESMTPS id u1si1556553vek.67.2014.02.27.11.51.47 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 27 Feb 2014 11:51:47 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.178 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.178; Received: by mail-vc0-f178.google.com with SMTP id ik5so2970739vcb.23 for ; Thu, 27 Feb 2014 11:51:46 -0800 (PST) X-Received: by 10.52.241.106 with SMTP id wh10mr3182467vdc.16.1393530706931; Thu, 27 Feb 2014 11:51:46 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.130.193 with SMTP id u1csp1524vcs; Thu, 27 Feb 2014 11:51:46 -0800 (PST) X-Received: by 10.68.197.99 with SMTP id it3mr15002746pbc.37.1393530705966; Thu, 27 Feb 2014 11:51:45 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id yo5si352357pab.34.2014.02.27.11.51.45; Thu, 27 Feb 2014 11:51:45 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-usb-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753303AbaB0Tvn (ORCPT + 3 others); Thu, 27 Feb 2014 14:51:43 -0500 Received: from bear.ext.ti.com ([192.94.94.41]:57341 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751729AbaB0Tv2 (ORCPT ); Thu, 27 Feb 2014 14:51:28 -0500 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id s1RJpSlr025403 for ; Thu, 27 Feb 2014 13:51:28 -0600 Received: from DLEE70.ent.ti.com (dlee70.ent.ti.com [157.170.170.113]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id s1RJpSg2013640 for ; Thu, 27 Feb 2014 13:51:28 -0600 Received: from dflp32.itg.ti.com (10.64.6.15) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.3.174.1; Thu, 27 Feb 2014 13:51:28 -0600 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dflp32.itg.ti.com (8.14.3/8.13.8) with ESMTP id s1RJpRE9023801; Thu, 27 Feb 2014 13:51:28 -0600 From: Felipe Balbi To: Linux USB Mailing List CC: Felipe Balbi Subject: [PATCH 5/8] usb: dwc3: omap: fix order of pm_runtime vs child removal Date: Thu, 27 Feb 2014 13:49:54 -0600 Message-ID: <1393530597-12259-5-git-send-email-balbi@ti.com> X-Mailer: git-send-email 1.9.0 In-Reply-To: <1393530597-12259-1-git-send-email-balbi@ti.com> References: <1393530597-12259-1-git-send-email-balbi@ti.com> MIME-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: balbi@ti.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.178 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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 1b086bb..513bb9d 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; }