aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorPeter Chen <peter.chen@nxp.com>2020-12-10 21:33:21 +0800
committerPeter Chen <peter.chen@nxp.com>2020-12-29 13:39:53 +0800
commitd1357119157c4662d43143885f3691f9a766369a (patch)
tree35ff4a3f19c1c4adb5ce4f50772d5f990d07ae7d /drivers/usb
parentusb: cdns3: imx: fix can't create core device the second time issue (diff)
downloadlinux-dev-d1357119157c4662d43143885f3691f9a766369a.tar.xz
linux-dev-d1357119157c4662d43143885f3691f9a766369a.zip
usb: cdns3: imx: improve driver .remove API
Keep the runtime active during the remove operation, and disable related clocks. Signed-off-by: Peter Chen <peter.chen@nxp.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/cdns3/cdns3-imx.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/usb/cdns3/cdns3-imx.c b/drivers/usb/cdns3/cdns3-imx.c
index 6b358e8be579..7990fee03fe4 100644
--- a/drivers/usb/cdns3/cdns3-imx.c
+++ b/drivers/usb/cdns3/cdns3-imx.c
@@ -221,8 +221,13 @@ err:
static int cdns_imx_remove(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
+ struct cdns_imx *data = dev_get_drvdata(dev);
+ pm_runtime_get_sync(dev);
of_platform_depopulate(dev);
+ clk_bulk_disable_unprepare(data->num_clks, data->clks);
+ pm_runtime_disable(dev);
+ pm_runtime_put_noidle(dev);
platform_set_drvdata(pdev, NULL);
return 0;