diff mbox

[v7,2/4] usb: dwc3: of-simple: Re-order resource handling in remove

Message ID 1500479948-29988-3-git-send-email-p.zabel@pengutronix.de (mailing list archive)
State Not Applicable, archived
Delegated to: Andy Gross
Headers show

Commit Message

Philipp Zabel July 19, 2017, 3:59 p.m. UTC
From: Vivek Gautam <vivek.gautam@codeaurora.org>

Move clock handling after of_platform_depopulate to achieve
a sequence that is reverse of the probe sequence.

Cc: Felipe Balbi <balbi@kernel.org>
Signed-off-by: Vivek Gautam <vivek.gautam@codeaurora.org>
---
No changes since v6.
---
 drivers/usb/dwc3/dwc3-of-simple.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Felipe Balbi Oct. 19, 2017, 9:36 a.m. UTC | #1
Hi,

Philipp Zabel <p.zabel@pengutronix.de> writes:
> From: Vivek Gautam <vivek.gautam@codeaurora.org>
>
> Move clock handling after of_platform_depopulate to achieve
> a sequence that is reverse of the probe sequence.
>
> Cc: Felipe Balbi <balbi@kernel.org>
> Signed-off-by: Vivek Gautam <vivek.gautam@codeaurora.org>

does this depend on the rest of the series? Doesn't seem like it does.
diff mbox

Patch

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);