summaryrefslogtreecommitdiff
path: root/drivers/mmc/core/core.c
diff options
context:
space:
mode:
authorJohan Rudholm <johan.rudholm@stericsson.com>2012-08-23 13:40:55 +0200
committerChris Ball <cjb@laptop.org>2012-09-04 13:58:27 -0400
commit3339d1e33185798a45dbdb5ea6c0bec1c27ca5fd (patch)
tree6af12b5b69f6092510345999171582a595aa9841 /drivers/mmc/core/core.c
parent36c179a98a0755b98153e8f4ae08243fbfcd18ff (diff)
downloadlinux-3.10-3339d1e33185798a45dbdb5ea6c0bec1c27ca5fd.tar.gz
linux-3.10-3339d1e33185798a45dbdb5ea6c0bec1c27ca5fd.tar.bz2
linux-3.10-3339d1e33185798a45dbdb5ea6c0bec1c27ca5fd.zip
mmc: core: Do not rescan non-removable devices
If MMC_CAP_NONREMOVABLE is set, only issue a detect job on init. Signed-off-by: Johan Rudholm <johan.rudholm@stericsson.com> Acked-by: Ulf Hansson <ulf.hansson@linaro.org> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc/core/core.c')
-rw-r--r--drivers/mmc/core/core.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index 835c9f001a1..af2c4d2fd69 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -2053,6 +2053,11 @@ void mmc_rescan(struct work_struct *work)
if (host->rescan_disable)
return;
+ /* If there is a non-removable card registered, only scan once */
+ if ((host->caps & MMC_CAP_NONREMOVABLE) && host->rescan_entered)
+ return;
+ host->rescan_entered = 1;
+
mmc_bus_get(host);
/*