diff options
author | Adrian Hunter <adrian.hunter@intel.com> | 2011-12-27 14:48:42 +0100 |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2012-01-12 05:58:47 +0100 |
commit | c79396c191bc19703df6eb6bbd0f673ed0df6c9d (patch) | |
tree | 04f2590605e26467d384e907b767db8bf2390bde /drivers/mmc | |
parent | mmc: sdhci: fix vmmc handling (diff) | |
download | linux-c79396c191bc19703df6eb6bbd0f673ed0df6c9d.tar.xz linux-c79396c191bc19703df6eb6bbd0f673ed0df6c9d.zip |
mmc: sdhci: prevent card detection activity for non-removable cards
Do not enable card detection interrupts for non-removable cards.
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/host/sdhci.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 6a35d0368117..e6c6cd6e95f2 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -146,10 +146,9 @@ static void sdhci_set_card_detection(struct sdhci_host *host, bool enable) { u32 present, irqs; - if (host->quirks & SDHCI_QUIRK_BROKEN_CARD_DETECTION) - return; - - if (host->quirks2 & SDHCI_QUIRK2_OWN_CARD_DETECTION) + if ((host->quirks & SDHCI_QUIRK_BROKEN_CARD_DETECTION) || + (host->quirks2 & SDHCI_QUIRK2_OWN_CARD_DETECTION) || + !mmc_card_is_removable(host->mmc)) return; present = sdhci_readl(host, SDHCI_PRESENT_STATE) & |