diff options
author | Li Jun <jun.li@nxp.com> | 2017-12-14 01:11:18 +0800 |
---|---|---|
committer | Leonard Crestez <leonard.crestez@nxp.com> | 2018-08-24 12:41:33 +0300 |
commit | 50e18ac44310be3686a7c552ac7150ae628fc188 (patch) | |
tree | f0a37409c4b2c4fd1467418ede888962b7ca74b2 /drivers | |
parent | 5dca04d8639db9266a41669a5bc1fb734517a552 (diff) |
MLK-17203 usb: host: xhci-plat: fix high bus freq release mismatch
If the xhci platform device is already suspended, we can't
release high bus freq again, fix the high bus count mismatch.
Acked-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/host/xhci-plat.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c index a04af81f4e06..6a6a8440b040 100644 --- a/drivers/usb/host/xhci-plat.c +++ b/drivers/usb/host/xhci-plat.c @@ -328,9 +328,11 @@ static int xhci_plat_remove(struct platform_device *dev) clk_disable_unprepare(clk); usb_put_hcd(hcd); + if (!pm_runtime_suspended(&dev->dev)) + release_bus_freq(BUS_FREQ_HIGH); + pm_runtime_set_suspended(&dev->dev); pm_runtime_disable(&dev->dev); - release_bus_freq(BUS_FREQ_HIGH); return 0; } |