OSDN Git Service

mmc: sdhci: Fix issue with host op card_event()
authorSahitya Tummala <stummala@codeaurora.org>
Mon, 7 Apr 2014 05:03:11 +0000 (10:33 +0530)
committerSubhash Jadavani <subhashj@codeaurora.org>
Fri, 27 May 2016 17:29:05 +0000 (10:29 -0700)
For controllers that doesn't support card insertion/removal i.e.,
when the quirk SDHCI_QUIRK_BROKEN_CARD_DETECTION is defined,
card_event() host op must not rely on present state register
to check the card's status.

CRs-fixed: 644221
Change-Id: Icff6db0d8fe17f01cf751896ae09aee215edc548
Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
drivers/mmc/host/sdhci.c

index bd9e297..5602643 100644 (file)
@@ -344,6 +344,9 @@ static void sdhci_led_control(struct led_classdev *led,
        struct sdhci_host *host = container_of(led, struct sdhci_host, led);
        unsigned long flags;
 
+       if (host->quirks & SDHCI_QUIRK_BROKEN_CARD_DETECTION)
+               return;
+
        spin_lock_irqsave(&host->lock, flags);
 
        if (host->runtime_suspended || sdhci_check_state(host))