]> Pileus Git - ~andy/linux/blobdiff - drivers/mmc/core/mmc.c
Merge branch 'drm-tda998x-3.12-fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-cubox...
[~andy/linux] / drivers / mmc / core / mmc.c
index 7f5dc26865de7b31932e362f97308c0d4d81d71e..f631f5a9bf7948b848754cc3ba475619c957a79b 100644 (file)
@@ -1577,11 +1577,13 @@ static int mmc_shutdown(struct mmc_host *host)
  */
 static int mmc_resume(struct mmc_host *host)
 {
-       int err;
+       int err = 0;
 
-       err = _mmc_resume(host);
-       pm_runtime_set_active(&host->card->dev);
-       pm_runtime_mark_last_busy(&host->card->dev);
+       if (!(host->caps & MMC_CAP_RUNTIME_RESUME)) {
+               err = _mmc_resume(host);
+               pm_runtime_set_active(&host->card->dev);
+               pm_runtime_mark_last_busy(&host->card->dev);
+       }
        pm_runtime_enable(&host->card->dev);
 
        return err;
@@ -1612,7 +1614,7 @@ static int mmc_runtime_resume(struct mmc_host *host)
 {
        int err;
 
-       if (!(host->caps & MMC_CAP_AGGRESSIVE_PM))
+       if (!(host->caps & (MMC_CAP_AGGRESSIVE_PM | MMC_CAP_RUNTIME_RESUME)))
                return 0;
 
        err = _mmc_resume(host);