Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 201386
b: refs/heads/master
c: 74bc809
h: refs/heads/master
v: v3
  • Loading branch information
Russell King committed Jul 30, 2010
1 parent 4395a27 commit 7145c8c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 831e8047eb2af310184a9d4d9e749f3de119ae39
refs/heads/master: 74bc80931c8bc34d24545f992a35349ad548897c
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-realview/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ static unsigned int realview_mmc_status(struct device *dev)
else
mask = 2;

return !(readl(REALVIEW_SYSMCI) & mask);
return readl(REALVIEW_SYSMCI) & mask;
}

struct mmci_platform_data realview_mmc0_plat_data = {
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-vexpress/v2m.c
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ static struct platform_device v2m_flash_device = {

static unsigned int v2m_mmci_status(struct device *dev)
{
return !(readl(MMIO_P2V(V2M_SYS_MCI)) & (1 << 0));
return readl(MMIO_P2V(V2M_SYS_MCI)) & (1 << 0);
}

static struct mmci_platform_data v2m_mmci_data = {
Expand Down
8 changes: 6 additions & 2 deletions trunk/drivers/mmc/host/mmci.c
Original file line number Diff line number Diff line change
Expand Up @@ -539,9 +539,13 @@ static int mmci_get_cd(struct mmc_host *mmc)
if (host->gpio_cd == -ENOSYS)
status = host->plat->status(mmc_dev(host->mmc));
else
status = gpio_get_value(host->gpio_cd);
status = !gpio_get_value(host->gpio_cd);

return !status;
/*
* Use positive logic throughout - status is zero for no card,
* non-zero for card inserted.
*/
return status;
}

static const struct mmc_host_ops mmci_ops = {
Expand Down

0 comments on commit 7145c8c

Please sign in to comment.