aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ohci-at91.c
diff options
context:
space:
mode:
authorNicolas Ferre <nicolas.ferre@atmel.com>2012-02-11 08:23:06 -0500
committerNicolas Ferre <nicolas.ferre@atmel.com>2012-03-01 07:29:01 -0500
commite44990790a2528dc825a258bf931c745710f652e (patch)
tree7f6da3cdcd0d1a729b2d1043423309d181313592 /drivers/usb/host/ohci-at91.c
parentfe5e07967187f3af538c237921993ec5889b3f2a (diff)
ARM/USB: at91/ohci-at91: remove the use of irq_to_gpio
irq_to_gpio() macro will be removed from AT91 GPIO interrupt controller. So we replace it with the use of gpio_to_irq() and a reworked test. Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Cc: linux-usb@vger.kernel.org
Diffstat (limited to 'drivers/usb/host/ohci-at91.c')
-rw-r--r--drivers/usb/host/ohci-at91.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/usb/host/ohci-at91.c b/drivers/usb/host/ohci-at91.c
index 77afabc77f9b..8e855eb0bf89 100644
--- a/drivers/usb/host/ohci-at91.c
+++ b/drivers/usb/host/ohci-at91.c
@@ -448,10 +448,11 @@ static irqreturn_t ohci_hcd_at91_overcurrent_irq(int irq, void *data)
448 448
449 /* From the GPIO notifying the over-current situation, find 449 /* From the GPIO notifying the over-current situation, find
450 * out the corresponding port */ 450 * out the corresponding port */
451 gpio = irq_to_gpio(irq);
452 for (port = 0; port < ARRAY_SIZE(pdata->overcurrent_pin); port++) { 451 for (port = 0; port < ARRAY_SIZE(pdata->overcurrent_pin); port++) {
453 if (pdata->overcurrent_pin[port] == gpio) 452 if (gpio_to_irq(pdata->overcurrent_pin[port]) == irq) {
453 gpio = pdata->overcurrent_pin[port];
454 break; 454 break;
455 }
455 } 456 }
456 457
457 if (port == ARRAY_SIZE(pdata->overcurrent_pin)) { 458 if (port == ARRAY_SIZE(pdata->overcurrent_pin)) {