Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d6d9c2a3 authored by Vivek Gautam's avatar Vivek Gautam Committed by Felipe Balbi
Browse files

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: default avatarVivek Gautam <vivek.gautam@codeaurora.org>
Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
parent e0d63c40
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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);