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>
This commit is contained in:
committed by
Chris Ball
parent
d83b6e035f
commit
17e9ff559a
@@ -2355,7 +2355,13 @@ int mmc_suspend_host(struct mmc_host *host)
|
|||||||
cancel_delayed_work(&host->disable);
|
cancel_delayed_work(&host->disable);
|
||||||
cancel_delayed_work(&host->detect);
|
cancel_delayed_work(&host->detect);
|
||||||
mmc_flush_scheduled_work();
|
mmc_flush_scheduled_work();
|
||||||
|
if (mmc_try_claim_host(host)) {
|
||||||
err = mmc_cache_ctrl(host, 0);
|
err = mmc_cache_ctrl(host, 0);
|
||||||
|
mmc_do_release_host(host);
|
||||||
|
} else {
|
||||||
|
err = -EBUSY;
|
||||||
|
}
|
||||||
|
|
||||||
if (err)
|
if (err)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user