Skip to content

Commit d135711

Browse files
author
Peter Chen
committed
usb: cdns3: imx: improve driver .remove API
Keep the runtime active during the remove operation, and disable related clocks. Signed-off-by: Peter Chen <[email protected]>
1 parent 2ef02b8 commit d135711

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

drivers/usb/cdns3/cdns3-imx.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,8 +221,13 @@ static int cdns_imx_probe(struct platform_device *pdev)
221221
static int cdns_imx_remove(struct platform_device *pdev)
222222
{
223223
struct device *dev = &pdev->dev;
224+
struct cdns_imx *data = dev_get_drvdata(dev);
224225

226+
pm_runtime_get_sync(dev);
225227
of_platform_depopulate(dev);
228+
clk_bulk_disable_unprepare(data->num_clks, data->clks);
229+
pm_runtime_disable(dev);
230+
pm_runtime_put_noidle(dev);
226231
platform_set_drvdata(pdev, NULL);
227232

228233
return 0;

0 commit comments

Comments
 (0)