diff options
author | Vivek Gautam <vivek.gautam@codeaurora.org> | 2017-07-19 18:59:06 +0300 |
---|---|---|
committer | Felipe Balbi <felipe.balbi@linux.intel.com> | 2017-10-19 12:36:53 +0300 |
commit | d6d9c2a3eac279d0bf406573706b7e7cf9d7fdda (patch) | |
tree | 510b5a85a6f8516719ff869ac2eee22db2257b66 /drivers/usb/dwc3 | |
parent | e0d63c4083852e07655dfcda1320504c304218be (diff) | |
download | linux-d6d9c2a3eac279d0bf406573706b7e7cf9d7fdda.tar.xz |
usb: dwc3: of-simple: Re-order resource handling in remove
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>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb/dwc3')
-rw-r--r-- | drivers/usb/dwc3/dwc3-of-simple.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/dwc3/dwc3-of-simple.c b/drivers/usb/dwc3/dwc3-of-simple.c index a26d1fde0f5e..e129c3278081 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); |