Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1669133

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

From Philipp Zabel <p.zabel@pengutronix.de>
Newsgroups linux.kernel
Subject [PATCH v6 2/4] usb: dwc3: of-simple: Re-order resource handling in remove
Date 2017-06-19 16:40 +0200
Message-ID <tU60r-3Pk-47@gated-at.bofh.it> (permalink)
References <tU60p-3Pk-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH v6 0/4] reset: APIs to manage a list of resets Philipp Zabel <p.zabel@pengutronix.de> - 2017-06-19 16:40 +0200
  [PATCH v6 1/4] reset: Add APIs to manage array of resets Philipp Zabel <p.zabel@pengutronix.de> - 2017-06-19 16:40 +0200
    Re: [PATCH v6 1/4] reset: Add APIs to manage array of resets kbuild test robot <lkp@intel.com> - 2017-06-19 22:30 +0200
  [PATCH v6 3/4] usb: dwc3: of-simple: Add support to get resets for the device Philipp Zabel <p.zabel@pengutronix.de> - 2017-06-19 16:40 +0200
  [PATCH v6 4/4] soc/tegra: pmc: Use the new reset APIs to manage reset controllers Philipp Zabel <p.zabel@pengutronix.de> - 2017-06-19 16:40 +0200
  [PATCH v6 2/4] usb: dwc3: of-simple: Re-order resource handling in remove Philipp Zabel <p.zabel@pengutronix.de> - 2017-06-19 16:40 +0200

csiph-web