Skip to content

Commit

Permalink
mmc: at91_mci: remove the use of irq_to_gpio
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Nicolas Ferre authored and Chris Ball committed Oct 26, 2011
1 parent 7e8ba22 commit 51c5d8d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion drivers/mmc/host/at91_mci.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
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,
Expand Down

0 comments on commit 51c5d8d

Please sign in to comment.