summaryrefslogtreecommitdiffstats
path: root/drivers/mmc/core/core.c
diff options
context:
space:
mode:
authorMaya Erez2013-01-28 22:44:22 +0100
committerChris Ball2013-02-24 20:37:00 +0100
commit881d926d9d0bd2eb50f8f90c993bc403853382ce (patch)
tree111c13cd2340a2199ebd367c83cbeb357d65da03 /drivers/mmc/core/core.c
parentMAINTAINERS: mmc: add maintainer entry for dw_mmc driver (diff)
downloadkernel-qcow2-linux-881d926d9d0bd2eb50f8f90c993bc403853382ce.tar.gz
kernel-qcow2-linux-881d926d9d0bd2eb50f8f90c993bc403853382ce.tar.xz
kernel-qcow2-linux-881d926d9d0bd2eb50f8f90c993bc403853382ce.zip
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/core.c')
-rw-r--r--drivers/mmc/core/core.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index 8b3a1222e665..39f28af34cb6 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -2486,6 +2486,7 @@ EXPORT_SYMBOL(mmc_flush_cache);
* Turn the cache ON/OFF.
* Turning the cache OFF shall trigger flushing of the data
* to the non-volatile storage.
+ * This function should be called with host claimed
*/
int mmc_cache_ctrl(struct mmc_host *host, u8 enable)
{
@@ -2497,7 +2498,6 @@ int mmc_cache_ctrl(struct mmc_host *host, u8 enable)
mmc_card_is_removable(host))
return err;
- mmc_claim_host(host);
if (card && mmc_card_mmc(card) &&
(card->ext_csd.cache_size > 0)) {
enable = !!enable;
@@ -2515,7 +2515,6 @@ int mmc_cache_ctrl(struct mmc_host *host, u8 enable)
card->ext_csd.cache_ctrl = enable;
}
}
- mmc_release_host(host);
return err;
}
@@ -2534,10 +2533,6 @@ int mmc_suspend_host(struct mmc_host *host)
cancel_delayed_work(&host->detect);
mmc_flush_scheduled_work();
- err = mmc_cache_ctrl(host, 0);
- if (err)
- goto out;
-
mmc_bus_get(host);
if (host->bus_ops && !host->bus_dead) {
if (host->bus_ops->suspend) {