aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/mmci.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mmc/host/mmci.c')
-rw-r--r--drivers/mmc/host/mmci.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c
index 4917af96bae1..2ed435bd4b6c 100644
--- a/drivers/mmc/host/mmci.c
+++ b/drivers/mmc/host/mmci.c
@@ -539,9 +539,13 @@ static int mmci_get_cd(struct mmc_host *mmc)
539 if (host->gpio_cd == -ENOSYS) 539 if (host->gpio_cd == -ENOSYS)
540 status = host->plat->status(mmc_dev(host->mmc)); 540 status = host->plat->status(mmc_dev(host->mmc));
541 else 541 else
542 status = gpio_get_value(host->gpio_cd); 542 status = !gpio_get_value(host->gpio_cd);
543 543
544 return !status; 544 /*
545 * Use positive logic throughout - status is zero for no card,
546 * non-zero for card inserted.
547 */
548 return status;
545} 549}
546 550
547static const struct mmc_host_ops mmci_ops = { 551static const struct mmc_host_ops mmci_ops = {