Skip to content

Commit

Permalink
mmc: mmci: Do pm_runtime_put() after the host has been added
Browse files Browse the repository at this point in the history
Previously the pm_runtime_put() caused the device to be runtime PM
suspended, but then immediately being resumed when we add the host.

Prevent this unnecessary runtime PM suspend/resume cycle during
->probe() by moving the call to pm_runtime_put() after mmc_add_host().

Signed-off-by: Ulf Hansson <[email protected]>
  • Loading branch information
storulf committed Jan 19, 2015
1 parent 106276b commit 6f2d3c8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/mmc/host/mmci.c
Original file line number Diff line number Diff line change
Expand Up @@ -1739,10 +1739,10 @@ static int mmci_probe(struct amba_device *dev,

pm_runtime_set_autosuspend_delay(&dev->dev, 50);
pm_runtime_use_autosuspend(&dev->dev);
pm_runtime_put(&dev->dev);

mmc_add_host(mmc);

pm_runtime_put(&dev->dev);
return 0;

clk_disable:
Expand Down

0 comments on commit 6f2d3c8

Please sign in to comment.