* [PATCH] MMC: jz4740: Fixed card change detection.
@ 2010-08-03 16:32 Lars-Peter Clausen
2010-08-05 0:23 ` Ralf Baechle
0 siblings, 1 reply; 2+ messages in thread
From: Lars-Peter Clausen @ 2010-08-03 16:32 UTC (permalink / raw)
To: Ralf Baechle
Cc: linux-mips, linux-mmc, Maarten ter Huurne, Lars-Peter Clausen
From: Maarten ter Huurne <maarten@treewalker.org>
The GPIO validity check was reversed.
Also removed some dead code.
Signed-off-by: Maarten ter Huurne <maarten@treewalker.org>
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
drivers/mmc/host/jz4740_mmc.c | 8 ++------
1 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/mmc/host/jz4740_mmc.c b/drivers/mmc/host/jz4740_mmc.c
index 12efd9c..ad4f987 100644
--- a/drivers/mmc/host/jz4740_mmc.c
+++ b/drivers/mmc/host/jz4740_mmc.c
@@ -761,24 +761,20 @@ err:
static int __devinit jz4740_mmc_request_cd_irq(struct platform_device *pdev,
struct jz4740_mmc_host *host)
{
- int ret;
struct jz4740_mmc_platform_data *pdata = pdev->dev.platform_data;
- if (gpio_is_valid(pdata->gpio_card_detect))
+ if (!gpio_is_valid(pdata->gpio_card_detect))
return 0;
host->card_detect_irq = gpio_to_irq(pdata->gpio_card_detect);
-
if (host->card_detect_irq < 0) {
dev_warn(&pdev->dev, "Failed to get card detect irq\n");
return 0;
}
+
return request_irq(host->card_detect_irq, jz4740_mmc_card_detect_irq,
IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
"MMC card detect", host);
-
-
- return ret;
}
static void jz4740_mmc_free_gpios(struct platform_device *pdev)
--
1.5.6.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] MMC: jz4740: Fixed card change detection.
2010-08-03 16:32 [PATCH] MMC: jz4740: Fixed card change detection Lars-Peter Clausen
@ 2010-08-05 0:23 ` Ralf Baechle
0 siblings, 0 replies; 2+ messages in thread
From: Ralf Baechle @ 2010-08-05 0:23 UTC (permalink / raw)
To: Lars-Peter Clausen; +Cc: linux-mips, linux-mmc, Maarten ter Huurne
Applied on lmo rsp. folded into the patches pending for Linus and -next.
Thanks,
Ralf
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-08-05 0:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-03 16:32 [PATCH] MMC: jz4740: Fixed card change detection Lars-Peter Clausen
2010-08-05 0:23 ` Ralf Baechle
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.