From patchwork Mon Jun 19 14:34:06 2017
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Philipp Zabel
X-Patchwork-Id: 9795999
X-Patchwork-Delegate: agross@codeaurora.org
Return-Path:
Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org
[172.30.200.125])
by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id
8D9A3600C5 for ;
Mon, 19 Jun 2017 14:34:29 +0000 (UTC)
Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1])
by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6BC7B22638
for ;
Mon, 19 Jun 2017 14:34:29 +0000 (UTC)
Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486)
id 6093122B26; Mon, 19 Jun 2017 14:34:29 +0000 (UTC)
X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on
pdx-wl-mail.web.codeaurora.org
X-Spam-Level:
X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI
autolearn=ham version=3.3.1
Received: from vger.kernel.org (vger.kernel.org [209.132.180.67])
by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1E33F22638
for ;
Mon, 19 Jun 2017 14:34:29 +0000 (UTC)
Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
id S1751082AbdFSOe0 (ORCPT
);
Mon, 19 Jun 2017 10:34:26 -0400
Received: from metis.ext.4.pengutronix.de ([92.198.50.35]:48433 "EHLO
metis.ext.4.pengutronix.de" rhost-flags-OK-OK-OK-OK)
by vger.kernel.org with ESMTP id S1751998AbdFSOeZ (ORCPT
);
Mon, 19 Jun 2017 10:34:25 -0400
Received: from dude.hi.pengutronix.de ([2001:67c:670:100:1d::7]
helo=dude.pengutronix.de.)
by metis.ext.pengutronix.de with esmtp (Exim 4.84_2)
(envelope-from )
id 1dMxkv-0001Px-9P; Mon, 19 Jun 2017 16:34:17 +0200
From: Philipp Zabel
To: linux-kernel@vger.kernel.org
Cc: Vivek Gautam ,
Jon Hunter , Felipe Balbi ,
Greg Kroah-Hartman ,
Thierry Reding ,
linux-tegra@vger.kernel.org, linux-usb@vger.kernel.org,
linux-arm-msm@vger.kernel.org
Subject: [PATCH v6 2/4] usb: dwc3: of-simple: Re-order resource handling in
remove
Date: Mon, 19 Jun 2017 16:34:06 +0200
Message-Id: <20170619143408.15668-3-p.zabel@pengutronix.de>
X-Mailer: git-send-email 2.11.0
In-Reply-To: <20170619143408.15668-1-p.zabel@pengutronix.de>
References: <20170619143408.15668-1-p.zabel@pengutronix.de>
X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::7
X-SA-Exim-Mail-From: p.zabel@pengutronix.de
X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de);
SAEximRunCond expanded to false
X-PTX-Original-Recipient: linux-arm-msm@vger.kernel.org
Sender: linux-arm-msm-owner@vger.kernel.org
Precedence: bulk
List-ID:
X-Mailing-List: linux-arm-msm@vger.kernel.org
X-Virus-Scanned: ClamAV using ClamSMTP
From: Vivek Gautam
Move clock handling after of_platform_depopulate to achieve
a sequence that is reverse of the probe sequence.
Cc: Felipe Balbi
Signed-off-by: Vivek Gautam
---
No changes since v5.
---
drivers/usb/dwc3/dwc3-of-simple.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/dwc3/dwc3-of-simple.c b/drivers/usb/dwc3/dwc3-of-simple.c
index fe414e7a9c78c..a9bac09d3750d 100644
--- a/drivers/usb/dwc3/dwc3-of-simple.c
+++ b/drivers/usb/dwc3/dwc3-of-simple.c
@@ -123,13 +123,13 @@ static int dwc3_of_simple_remove(struct platform_device *pdev)
struct device *dev = &pdev->dev;
int i;
+ of_platform_depopulate(dev);
+
for (i = 0; i < simple->num_clocks; i++) {
clk_disable_unprepare(simple->clks[i]);
clk_put(simple->clks[i]);
}
- of_platform_depopulate(dev);
-
pm_runtime_put_sync(dev);
pm_runtime_disable(dev);