Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 212426
b: refs/heads/master
c: 4b8caec
h: refs/heads/master
v: v3
  • Loading branch information
Rabin Vincent authored and Russell King committed Sep 23, 2010
1 parent 7b44420 commit 3d6e4f6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 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: 148b8b39c156424da22693d26adcb69800faf95e
refs/heads/master: 4b8caec09562ce7e6e3aaf2954eef8ea73ba67b8
10 changes: 7 additions & 3 deletions trunk/drivers/mmc/host/mmci.c
Original file line number Diff line number Diff line change
Expand Up @@ -589,9 +589,12 @@ static int mmci_get_cd(struct mmc_host *mmc)
struct mmci_platform_data *plat = host->plat;
unsigned int status;

if (host->gpio_cd == -ENOSYS)
if (host->gpio_cd == -ENOSYS) {
if (!plat->status)
return 1; /* Assume always present */

status = plat->status(mmc_dev(host->mmc));
else
} else
status = !!gpio_get_value(host->gpio_cd) ^ plat->cd_invert;

/*
Expand Down Expand Up @@ -787,7 +790,8 @@ static int __devinit mmci_probe(struct amba_device *dev, struct amba_id *id)
goto err_gpio_wp;
}

if (host->gpio_cd_irq < 0)
if ((host->plat->status || host->gpio_cd != -ENOSYS)
&& host->gpio_cd_irq < 0)
mmc->caps |= MMC_CAP_NEEDS_POLL;

ret = request_irq(dev->irq[0], mmci_irq, IRQF_SHARED, DRIVER_NAME " (cmd)", host);
Expand Down

0 comments on commit 3d6e4f6

Please sign in to comment.