Message ID | 1418982622-8118-1-git-send-email-ulf.hansson@linaro.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Fri, Dec 19, 2014 at 10:50:22AM +0100, Ulf Hansson wrote: > 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 using the pm_runtime_put_noidle() variant instead. Better would be to move it below mmc_add_host(). Then we're not depending on behaviour of other code.
diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c index 8232e9a..3a05fca 100644 --- a/drivers/mmc/host/mmci.c +++ b/drivers/mmc/host/mmci.c @@ -1739,7 +1739,7 @@ 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); + pm_runtime_put_noidle(&dev->dev); mmc_add_host(mmc);
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 using the pm_runtime_put_noidle() variant instead. Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> --- drivers/mmc/host/mmci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)