Skip to content

Commit

Permalink
usb: musb: Drop pointless PM runtime code for dsps glue
Browse files Browse the repository at this point in the history
This already gets done automatically by PM runtime and we have
a separate autosuspend timeout in musb_core.c.

Reviewed-by: Johan Hovold <johan@kernel.org>
Tested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Bin Liu <b-liu@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Tony Lindgren authored and Greg Kroah-Hartman committed Nov 17, 2016
1 parent 536d599 commit 2475291
Showing 1 changed file with 2 additions and 20 deletions.
22 changes: 2 additions & 20 deletions drivers/usb/musb/musb_dsps.c
Original file line number Diff line number Diff line change
Expand Up @@ -783,28 +783,13 @@ static int dsps_probe(struct platform_device *pdev)

platform_set_drvdata(pdev, glue);
pm_runtime_enable(&pdev->dev);
pm_runtime_use_autosuspend(&pdev->dev);
pm_runtime_set_autosuspend_delay(&pdev->dev, 200);

ret = pm_runtime_get_sync(&pdev->dev);
if (ret < 0) {
dev_err(&pdev->dev, "pm_runtime_get_sync FAILED");
goto err2;
}

ret = dsps_create_musb_pdev(glue, pdev);
if (ret)
goto err3;

pm_runtime_mark_last_busy(&pdev->dev);
pm_runtime_put_autosuspend(&pdev->dev);
goto err;

return 0;

err3:
pm_runtime_put_sync(&pdev->dev);
err2:
pm_runtime_dont_use_autosuspend(&pdev->dev);
err:
pm_runtime_disable(&pdev->dev);
return ret;
}
Expand All @@ -815,9 +800,6 @@ static int dsps_remove(struct platform_device *pdev)

platform_device_unregister(glue->musb);

/* disable usbss clocks */
pm_runtime_dont_use_autosuspend(&pdev->dev);
pm_runtime_put_sync(&pdev->dev);
pm_runtime_disable(&pdev->dev);

return 0;
Expand Down

0 comments on commit 2475291

Please sign in to comment.