diff options
author | Andreas Fenkart <afenkart@gmail.com> | 2015-03-03 13:28:17 +0100 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2015-03-31 16:50:44 +0200 |
commit | 11227d12397c6dd5c578e27210aa14e3fa44f11c (patch) | |
tree | f3cfa6204d26b0b1285169e9c331e57df69fa494 /drivers/mmc | |
parent | b793f658b194edfe5e1d86aaeace01a7b03c68f9 (diff) | |
download | talos-op-linux-11227d12397c6dd5c578e27210aa14e3fa44f11c.tar.gz talos-op-linux-11227d12397c6dd5c578e27210aa14e3fa44f11c.zip |
mmc: omap_hsmmc: simplify card/cover detect isr
strip the card dectet logic from cover detect isr and vice versa
the generic mmc_gpio_cd_irqt isr, uses 200ms on removal/insertion,
hence that should be fine here as well
Signed-off-by: Andreas Fenkart <afenkart@gmail.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/host/omap_hsmmc.c | 27 |
1 files changed, 3 insertions, 24 deletions
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index 08d537797b13..ea7028517124 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -1241,21 +1241,11 @@ static void omap_hsmmc_protect_card(struct omap_hsmmc_host *host) static irqreturn_t omap_hsmmc_cover_irq(int irq, void *dev_id) { struct omap_hsmmc_host *host = dev_id; - int carddetect; sysfs_notify(&host->mmc->class_dev.kobj, NULL, "cover_switch"); - if (host->card_detect) { - carddetect = host->card_detect(host->dev); - } else { - omap_hsmmc_protect_card(host); - carddetect = -ENOSYS; - } - - if (carddetect) - mmc_detect_change(host->mmc, (HZ * 200) / 1000); - else - mmc_detect_change(host->mmc, (HZ * 50) / 1000); + omap_hsmmc_protect_card(host); + mmc_detect_change(host->mmc, (HZ * 200) / 1000); return IRQ_HANDLED; } @@ -1265,19 +1255,8 @@ static irqreturn_t omap_hsmmc_cover_irq(int irq, void *dev_id) static irqreturn_t omap_hsmmc_detect(int irq, void *dev_id) { struct omap_hsmmc_host *host = dev_id; - int carddetect; - - if (host->card_detect) - carddetect = host->card_detect(host->dev); - else { - omap_hsmmc_protect_card(host); - carddetect = -ENOSYS; - } - if (carddetect) - mmc_detect_change(host->mmc, (HZ * 200) / 1000); - else - mmc_detect_change(host->mmc, (HZ * 50) / 1000); + mmc_detect_change(host->mmc, (HZ * 200) / 1000); return IRQ_HANDLED; } |