aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2013-12-05 08:34:46 -0500
committerChris Ball <chris@printf.net>2014-01-13 12:48:17 -0500
commitc1b55bfcb3e5599eb5e67efed70698ade02add4e (patch)
treeb13f59539096bb8e14b2b8a5244370f8b5b2a251
parent07c001c119c7de92be9c8ad1f1a3e5af459cb3d4 (diff)
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 <s.hauer@pengutronix.de> Acked-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Chris Ball <cjb@laptop.org>
-rw-r--r--drivers/mmc/core/core.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index 57a2b403bf8e..098374b1ab2b 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -2460,7 +2460,8 @@ void mmc_rescan(struct work_struct *work)
2460 */ 2460 */
2461 mmc_bus_put(host); 2461 mmc_bus_put(host);
2462 2462
2463 if (host->ops->get_cd && host->ops->get_cd(host) == 0) { 2463 if (!(host->caps & MMC_CAP_NONREMOVABLE) && host->ops->get_cd &&
2464 host->ops->get_cd(host) == 0) {
2464 mmc_claim_host(host); 2465 mmc_claim_host(host);
2465 mmc_power_off(host); 2466 mmc_power_off(host);
2466 mmc_release_host(host); 2467 mmc_release_host(host);