]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
usb: dwc3: of-simple: Re-order resource handling in remove
authorVivek Gautam <vivek.gautam@codeaurora.org>
Wed, 19 Jul 2017 15:59:06 +0000 (17:59 +0200)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Thu, 19 Oct 2017 09:36:53 +0000 (12:36 +0300)
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>
drivers/usb/dwc3/dwc3-of-simple.c

index a26d1fde0f5e4b6f3613387da40aaca00f937477..e129c327808180953a3e21ea7531af04e9b6f790 100644 (file)
@@ -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);