Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Seungwon Jeon and committed by
Chris Ball
17e9ff55 d83b6e03

+7 -1
+7 -1
drivers/mmc/core/core.c
··· 2355 2355 cancel_delayed_work(&host->disable); 2356 2356 cancel_delayed_work(&host->detect); 2357 2357 mmc_flush_scheduled_work(); 2358 - err = mmc_cache_ctrl(host, 0); 2358 + if (mmc_try_claim_host(host)) { 2359 + err = mmc_cache_ctrl(host, 0); 2360 + mmc_do_release_host(host); 2361 + } else { 2362 + err = -EBUSY; 2363 + } 2364 + 2359 2365 if (err) 2360 2366 goto out; 2361 2367