mirror of
https://github.com/torvalds/linux.git
synced 2026-06-10 07:32:29 +02:00
tegra-sdhci: treat -1 as invalid card detect GPIO
0 is a valid GPIO number (GPIO_PA0), so the check in the tegra SDHCI driver for a valid card detect pin should compare against -1 instead Change-Id: I47ad31eaf89472b2e6938978d72a9d0b92a74958 Signed-off-by: Gary King <gking@nvidia.com>
This commit is contained in:
parent
0a37a25e5e
commit
52525d352a
|
|
@ -128,7 +128,7 @@ static int __devinit tegra_sdhci_probe(struct platform_device *pdev)
|
|||
|
||||
platform_set_drvdata(pdev, host);
|
||||
|
||||
if (plat->cd_gpio) {
|
||||
if (plat->cd_gpio != -1) {
|
||||
rc = request_irq(gpio_to_irq(plat->cd_gpio), carddetect_irq,
|
||||
IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING,
|
||||
mmc_hostname(sdhci->mmc), sdhci);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user