summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorIvan T. Ivanov <ivan.ivanov@linaro.org>2015-07-06 12:16:20 (GMT)
committerUlf Hansson <ulf.hansson@linaro.org>2015-08-17 09:32:44 (GMT)
commitc31d22eb335d4e3d2016135038fac8daaa9708d6 (patch)
treee34131791940dedf4d7ce4f4d92ac24f49034098 /drivers
parent88af56552b121295ba905db2523b1622fb4fc1e4 (diff)
downloadlinux-c31d22eb335d4e3d2016135038fac8daaa9708d6.tar.xz
mmc: sdhci: don't use card state polling when CD GPIO is defined
There is no reason to use polling for card detection state change when drivers are using dedicated GPIO for this. Don't poll in this case. Signed-off-by: Ivan T. Ivanov <ivan.ivanov@linaro.org> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mmc/host/sdhci.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index f85476f..cb138d6 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -3135,7 +3135,8 @@ int sdhci_add_host(struct sdhci_host *host)
mmc->caps |= MMC_CAP_SD_HIGHSPEED | MMC_CAP_MMC_HIGHSPEED;
if ((host->quirks & SDHCI_QUIRK_BROKEN_CARD_DETECTION) &&
- !(mmc->caps & MMC_CAP_NONREMOVABLE))
+ !(mmc->caps & MMC_CAP_NONREMOVABLE) &&
+ IS_ERR_VALUE(mmc_gpio_get_cd(host->mmc)))
mmc->caps |= MMC_CAP_NEEDS_POLL;
/* If there are external regulators, get them */