aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/core/sd.c
diff options
context:
space:
mode:
authorUlf Hansson <ulf.hansson@linaro.org>2015-11-05 10:01:32 -0500
committerUlf Hansson <ulf.hansson@linaro.org>2015-12-22 05:32:03 -0500
commitc29536e85b5f7cf42b2e761f7ff35bc97de7cf95 (patch)
tree0a232d2996d0cecab2c4bce4cb1d3e2d8e608d47 /drivers/mmc/core/sd.c
parentd234d2123fa734c8018f7d01ed5d663cf5e6f665 (diff)
mmc: core: Make runtime resume default behavior for MMC/SD
MMC_CAP_RUNTIME_RESUME was invented to decrease system PM resume time for systems that particularly needs this. As the feature has matured let's make it the default behavior for MMC/SD. Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/core/sd.c')
-rw-r--r--drivers/mmc/core/sd.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/drivers/mmc/core/sd.c b/drivers/mmc/core/sd.c
index 141eaa923e18..8f3b46a56b3d 100644
--- a/drivers/mmc/core/sd.c
+++ b/drivers/mmc/core/sd.c
@@ -1128,16 +1128,8 @@ out:
1128 */ 1128 */
1129static int mmc_sd_resume(struct mmc_host *host) 1129static int mmc_sd_resume(struct mmc_host *host)
1130{ 1130{
1131 int err = 0;
1132
1133 if (!(host->caps & MMC_CAP_RUNTIME_RESUME)) {
1134 err = _mmc_sd_resume(host);
1135 pm_runtime_set_active(&host->card->dev);
1136 pm_runtime_mark_last_busy(&host->card->dev);
1137 }
1138 pm_runtime_enable(&host->card->dev); 1131 pm_runtime_enable(&host->card->dev);
1139 1132 return 0;
1140 return err;
1141} 1133}
1142 1134
1143/* 1135/*
@@ -1165,12 +1157,9 @@ static int mmc_sd_runtime_resume(struct mmc_host *host)
1165{ 1157{
1166 int err; 1158 int err;
1167 1159
1168 if (!(host->caps & (MMC_CAP_AGGRESSIVE_PM | MMC_CAP_RUNTIME_RESUME)))
1169 return 0;
1170
1171 err = _mmc_sd_resume(host); 1160 err = _mmc_sd_resume(host);
1172 if (err) 1161 if (err)
1173 pr_err("%s: error %d doing aggressive resume\n", 1162 pr_err("%s: error %d doing runtime resume\n",
1174 mmc_hostname(host), err); 1163 mmc_hostname(host), err);
1175 1164
1176 return 0; 1165 return 0;