summaryrefslogtreecommitdiffstats
path: root/drivers/mmc/core/core.c
diff options
context:
space:
mode:
authorMarkus Mayer2014-04-09 00:19:43 +0200
committerChris Ball2014-04-22 13:06:36 +0200
commitfa372a51cb5f93800f711473e5a36e0e0c9a8f00 (patch)
tree2c2666b4717fa2dce00c498d79b1810cbda44f08 /drivers/mmc/core/core.c
parentmmc: sdhci: clarify DDR timing mode between SD-UHS and eMMC (diff)
downloadkernel-qcow2-linux-fa372a51cb5f93800f711473e5a36e0e0c9a8f00.tar.gz
kernel-qcow2-linux-fa372a51cb5f93800f711473e5a36e0e0c9a8f00.tar.xz
kernel-qcow2-linux-fa372a51cb5f93800f711473e5a36e0e0c9a8f00.zip
mmc: Delay the card_event callback into the mmc_rescan worker
This change removes the callback from atomic context which it doesn't need to be in, and puts it in line with the debounced rescan. This code is based on these e-mail threads with Christian Daudt: https://lkml.org/lkml/2013/8/19/539 https://lkml.org/lkml/2014/3/19/79 Signed-off-by: Markus Mayer <markus.mayer@linaro.org> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Chris Ball <chris@printf.net>
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 acbc3f2aaaf9..f396d1bb4ac4 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -2403,6 +2403,11 @@ void mmc_rescan(struct work_struct *work)
container_of(work, struct mmc_host, detect.work);
int i;
+ if (host->trigger_card_event && host->ops->card_event) {
+ host->ops->card_event(host);
+ host->trigger_card_event = false;
+ }
+
if (host->rescan_disable)
return;