summaryrefslogtreecommitdiffstats
path: root/drivers/mmc/core/slot-gpio.c
diff options
context:
space:
mode:
authorMarkus Mayer <markus.mayer@linaro.org>2014-04-08 15:19:43 -0700
committerChris Ball <chris@printf.net>2014-04-22 07:06:36 -0400
commitfa372a51cb5f93800f711473e5a36e0e0c9a8f00 (patch)
tree2c2666b4717fa2dce00c498d79b1810cbda44f08 /drivers/mmc/core/slot-gpio.c
parentbb8175a8aa42d731a840cd474e348ac3367eb5a0 (diff)
downloadlinux-fa372a51cb5f93800f711473e5a36e0e0c9a8f00.tar.bz2
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/slot-gpio.c')
-rw-r--r--drivers/mmc/core/slot-gpio.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/mmc/core/slot-gpio.c b/drivers/mmc/core/slot-gpio.c
index f7650b899e3d..5f89cb83d5f0 100644
--- a/drivers/mmc/core/slot-gpio.c
+++ b/drivers/mmc/core/slot-gpio.c
@@ -32,9 +32,7 @@ static irqreturn_t mmc_gpio_cd_irqt(int irq, void *dev_id)
/* Schedule a card detection after a debounce timeout */
struct mmc_host *host = dev_id;
- if (host->ops->card_event)
- host->ops->card_event(host);
-
+ host->trigger_card_event = true;
mmc_detect_change(host, msecs_to_jiffies(200));
return IRQ_HANDLED;