]> git.karo-electronics.de Git - linux-beck.git/commitdiff
mmc: sdhci: disable MMC_CAP_NEEDS_POLL in nonremovable case
authorJaehoon Chung <jh80.chung@samsung.com>
Mon, 27 Sep 2010 08:42:20 +0000 (09:42 +0100)
committerChris Ball <cjb@laptop.org>
Sat, 23 Oct 2010 13:11:15 +0000 (21:11 +0800)
When a controller requires SDHCI_QUIRK_BROKEN_CARD_DETECTION, we poll
for card insertion/removal, and that creates interrupts.  There's no
need to be doing this if we have a non-removable card.

This patch requires cards to be removable before we're willing to set
MMC_CAP_NEEDS_POLL.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Matt Fleming <matt@console-pimps.org>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
[cjb: modified changelog and code indentation]
Signed-off-by: Chris Ball <cjb@laptop.org>
drivers/mmc/host/sdhci.c

index 829e78a21a0d1be8649abdb778f7f37579228e64..96c7f6010d0d83c0a438ad04b7ee3a1c04a8a92b 100644 (file)
@@ -1849,7 +1849,8 @@ int sdhci_add_host(struct sdhci_host *host)
        if (caps & SDHCI_CAN_DO_HISPD)
                mmc->caps |= MMC_CAP_SD_HIGHSPEED | MMC_CAP_MMC_HIGHSPEED;
 
-       if (host->quirks & SDHCI_QUIRK_BROKEN_CARD_DETECTION)
+       if ((host->quirks & SDHCI_QUIRK_BROKEN_CARD_DETECTION) &&
+           mmc_card_is_removable(mmc))
                mmc->caps |= MMC_CAP_NEEDS_POLL;
 
        mmc->ocr_avail = 0;