Skip to content

Commit

Permalink
mmc: sdhci: prevent card detection activity for non-removable cards
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
ahunter6 authored and cjb committed Jan 12, 2012
1 parent ceb6143 commit c79396c
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions drivers/mmc/host/sdhci.c
Expand Up @@ -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) &
Expand Down

0 comments on commit c79396c

Please sign in to comment.