Typically the runtime idle function is triggered after resume and probe. Instead of immediately requesting the device to go into in-active state we make use of the autosuspend, if we have enabled it earlier.
Cc: Len Brown <[email protected]> Cc: Pavel Machek <[email protected]> Cc: Rafael J. Wysocki <[email protected]> Cc: Kevin Hilman <[email protected]> Cc: Alan Stern <[email protected]> Cc: Mika Westerberg <[email protected]> Cc: [email protected] Signed-off-by: Ulf Hansson <[email protected]> --- drivers/mmc/core/bus.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/mmc/core/bus.c b/drivers/mmc/core/bus.c index cdca8a7..7f0e900 100644 --- a/drivers/mmc/core/bus.c +++ b/drivers/mmc/core/bus.c @@ -205,6 +205,12 @@ static int mmc_runtime_resume(struct device *dev) static int mmc_runtime_idle(struct device *dev) { + if (pm_runtime_autosuspend_used(dev)) { + pm_runtime_mark_last_busy(dev); + pm_runtime_autosuspend(dev); + return -EBUSY; + } + return 0; } -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
