mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-10 04:48:04 +09: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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user