diff options
author | Maya Erez <merez@codeaurora.org> | 2013-01-29 01:44:22 +0400 |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2013-02-24 23:37:00 +0400 |
commit | 881d926d9d0bd2eb50f8f90c993bc403853382ce (patch) | |
tree | 111c13cd2340a2199ebd367c83cbeb357d65da03 /drivers/mmc/core/mmc.c | |
parent | f9e37137e420a626df4f5e7c4f0869bf7a1d4929 (diff) | |
download | linux-881d926d9d0bd2eb50f8f90c993bc403853382ce.tar.xz |
mmc: core: move the cache disabling operation to mmc_suspend
Cache control is an eMMC feature and in therefore should be
part of MMC's bus resume operations, performed in mmc_suspend,
rather than in the generic mmc_suspend_host().
Signed-off-by: Maya Erez <merez@codeaurora.org>
Acked-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc/core/mmc.c')
-rw-r--r-- | drivers/mmc/core/mmc.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c index e6e39111e05b..dc17d4097f9a 100644 --- a/drivers/mmc/core/mmc.c +++ b/drivers/mmc/core/mmc.c @@ -1379,6 +1379,11 @@ static int mmc_suspend(struct mmc_host *host) BUG_ON(!host->card); mmc_claim_host(host); + + err = mmc_cache_ctrl(host, 0); + if (err) + goto out; + if (mmc_can_poweroff_notify(host->card)) err = mmc_poweroff_notify(host->card, EXT_CSD_POWER_OFF_SHORT); else if (mmc_card_can_sleep(host)) @@ -1386,8 +1391,9 @@ static int mmc_suspend(struct mmc_host *host) else if (!mmc_host_is_spi(host)) err = mmc_deselect_cards(host); host->card->state &= ~(MMC_STATE_HIGHSPEED | MMC_STATE_HIGHSPEED_200); - mmc_release_host(host); +out: + mmc_release_host(host); return err; } |