From: Sascha Hauer Date: Thu, 5 Dec 2013 13:34:46 +0000 (+0100) Subject: mmc: Do not call get_cd for non removable cards X-Git-Tag: firefly_0821_release~6165^2~20 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=c97685364a14153ab246eb19471b72ca6a1f7981;p=firefly-linux-kernel-4.4.55.git mmc: Do not call get_cd for non removable cards Non removable cards are always present, so do not call get_cd for them. Signed-off-by: Sascha Hauer Acked-by: Ulf Hansson Signed-off-by: Chris Ball --- diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index 656b5da289e3..51e288cdbb26 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -2505,7 +2505,8 @@ void mmc_rescan(struct work_struct *work) */ mmc_bus_put(host); - if (host->ops->get_cd && host->ops->get_cd(host) == 0) { + if (!(host->caps & MMC_CAP_NONREMOVABLE) && host->ops->get_cd && + host->ops->get_cd(host) == 0) { mmc_claim_host(host); mmc_power_off(host); mmc_release_host(host);