mmc: at91_mci: remove the use of irq_to_gpio
authorNicolas Ferre <nicolas.ferre@atmel.com>
Thu, 4 Aug 2011 15:49:03 +0000 (16:49 +0100)
committerChris Ball <cjb@laptop.org>
Wed, 26 Oct 2011 19:43:27 +0000 (15:43 -0400)
Remove the use of irq_to_gpio() in the card detection interrupt
handler. The information is available in the board structure and
we can avoid using a function that has little meaning.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
drivers/mmc/host/at91_mci.c

index a4aa3af..a8b4d2a 100644 (file)
@@ -869,7 +869,11 @@ static irqreturn_t at91_mci_irq(int irq, void *devid)
 static irqreturn_t at91_mmc_det_irq(int irq, void *_host)
 {
        struct at91mci_host *host = _host;
 static irqreturn_t at91_mmc_det_irq(int irq, void *_host)
 {
        struct at91mci_host *host = _host;
-       int present = !gpio_get_value(irq_to_gpio(irq));
+       int present;
+
+       /* entering this ISR means that we have configured det_pin:
+        * we can use its value in board structure */
+       present = !gpio_get_value(host->board->det_pin);
 
        /*
         * we expect this irq on both insert and remove,
 
        /*
         * we expect this irq on both insert and remove,