|
@@ -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;
|
|
|
|