diff options
| -rw-r--r-- | arch/arm/mach-realview/core.c | 2 | ||||
| -rw-r--r-- | arch/arm/mach-vexpress/v2m.c | 2 | ||||
| -rw-r--r-- | drivers/mmc/host/mmci.c | 8 |
3 files changed, 8 insertions, 4 deletions
diff --git a/arch/arm/mach-realview/core.c b/arch/arm/mach-realview/core.c index 595be19f8ad5..02e9fdeb8faf 100644 --- a/arch/arm/mach-realview/core.c +++ b/arch/arm/mach-realview/core.c | |||
| @@ -237,7 +237,7 @@ static unsigned int realview_mmc_status(struct device *dev) | |||
| 237 | else | 237 | else |
| 238 | mask = 2; | 238 | mask = 2; |
| 239 | 239 | ||
| 240 | return !(readl(REALVIEW_SYSMCI) & mask); | 240 | return readl(REALVIEW_SYSMCI) & mask; |
| 241 | } | 241 | } |
| 242 | 242 | ||
| 243 | struct mmci_platform_data realview_mmc0_plat_data = { | 243 | struct mmci_platform_data realview_mmc0_plat_data = { |
diff --git a/arch/arm/mach-vexpress/v2m.c b/arch/arm/mach-vexpress/v2m.c index d250711b8c7a..c84239761cb4 100644 --- a/arch/arm/mach-vexpress/v2m.c +++ b/arch/arm/mach-vexpress/v2m.c | |||
| @@ -241,7 +241,7 @@ static struct platform_device v2m_flash_device = { | |||
| 241 | 241 | ||
| 242 | static unsigned int v2m_mmci_status(struct device *dev) | 242 | static unsigned int v2m_mmci_status(struct device *dev) |
| 243 | { | 243 | { |
| 244 | return !(readl(MMIO_P2V(V2M_SYS_MCI)) & (1 << 0)); | 244 | return readl(MMIO_P2V(V2M_SYS_MCI)) & (1 << 0); |
| 245 | } | 245 | } |
| 246 | 246 | ||
| 247 | static struct mmci_platform_data v2m_mmci_data = { | 247 | static struct mmci_platform_data v2m_mmci_data = { |
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 | ||
| 547 | static const struct mmc_host_ops mmci_ops = { | 551 | static const struct mmc_host_ops mmci_ops = { |
