From 24b9a59b32127af6e217e56490d643f39ca6ff60 Mon Sep 17 00:00:00 2001 From: Li Jun Date: Sat, 14 Mar 2020 15:16:32 +0800 Subject: [PATCH] MLK-23587-1 usb: dwc3: imx8mp: keep runtime active when remove driver As driver removal will do clocks disable, we don't need runtime suspend to disable clocks, so keep runtime resume when driver remove. Reviewed-by: Peter Chen Reviewed-by: Fugang Duan Signed-off-by: Li Jun --- drivers/usb/dwc3/dwc3-imx8mp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/dwc3/dwc3-imx8mp.c b/drivers/usb/dwc3/dwc3-imx8mp.c index 62c79a7b181e..55739d7f2a18 100644 --- a/drivers/usb/dwc3/dwc3-imx8mp.c +++ b/drivers/usb/dwc3/dwc3-imx8mp.c @@ -232,14 +232,14 @@ static int dwc3_imx8mp_remove(struct platform_device *pdev) struct dwc3_imx8mp *dwc = platform_get_drvdata(pdev); struct device *dev = &pdev->dev; + pm_runtime_get_sync(dev); of_platform_depopulate(dev); clk_disable_unprepare(dwc->bus_clk); clk_disable_unprepare(dwc->sleep_clk); - pm_runtime_allow(dev); pm_runtime_disable(dev); - + pm_runtime_put_noidle(dev); platform_set_drvdata(pdev, NULL); return 0;