summaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
authorSeungwon Jeon2011-12-26 10:03:05 +0100
committerChris Ball2012-01-12 05:58:46 +0100
commit17e9ff559a7dbb7a6df332007d2ffcd3e7d83fba (patch)
tree061d911ea055301633ac394990e497a8ba67d94d /drivers/mmc
parentmmc: omap: remove clock rate hard coding (diff)
downloadkernel-qcow2-linux-17e9ff559a7dbb7a6df332007d2ffcd3e7d83fba.tar.gz
kernel-qcow2-linux-17e9ff559a7dbb7a6df332007d2ffcd3e7d83fba.tar.xz
kernel-qcow2-linux-17e9ff559a7dbb7a6df332007d2ffcd3e7d83fba.zip
mmc: core: Add claiming of hosts during mmc_cache_ctrl
While calling mmc_cache_ctrl() a host is not claimed. This patch adds the mmc_try_claim_host() for quick response in suspend. Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com> Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/core/core.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index a2aa860956ef..22050525be84 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -2355,7 +2355,13 @@ int mmc_suspend_host(struct mmc_host *host)
cancel_delayed_work(&host->disable);
cancel_delayed_work(&host->detect);
mmc_flush_scheduled_work();
- err = mmc_cache_ctrl(host, 0);
+ if (mmc_try_claim_host(host)) {
+ err = mmc_cache_ctrl(host, 0);
+ mmc_do_release_host(host);
+ } else {
+ err = -EBUSY;
+ }
+
if (err)
goto out;