mmc: core: Use mmc_flush_cache() during mmc suspend
Earlier we disabled the cache during suspend, which meant a flush was
internally at the eMMC performed as well.
To simplify code we can make use of the mmc_flush_cache(), during mmc
suspend, which makes the mmc_cache_ctrl() redundant so then we can
remove it.
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Acked-by: Seungwon Jeon <tgih.jun@samsung.com>
Signed-off-by: Chris Ball <chris@printf.net>
diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
index 5c4ee6a..6d446e2 100644
--- a/drivers/mmc/core/mmc.c
+++ b/drivers/mmc/core/mmc.c
@@ -1481,7 +1481,7 @@
goto out;
}
- err = mmc_cache_ctrl(host, 0);
+ err = mmc_flush_cache(host->card);
if (err)
goto out;