From: Nicolas Ferre Date: Sat, 11 Feb 2012 13:23:06 +0000 (+0100) Subject: ARM/USB: at91/ohci-at91: remove the use of irq_to_gpio X-Git-Tag: v3.4-rc1~71^2~10^2~19 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e44990790a2528dc825a258bf931c745710f652e;p=platform%2Fkernel%2Flinux-exynos.git 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 Acked-by: Jean-Christophe PLAGNIOL-VILLARD Acked-by: Greg Kroah-Hartman Cc: Thomas Petazzoni Cc: linux-usb@vger.kernel.org --- diff --git a/drivers/usb/host/ohci-at91.c b/drivers/usb/host/ohci-at91.c index 77afabc..8e855eb 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) /* From the GPIO notifying the over-current situation, find * out the corresponding port */ - gpio = irq_to_gpio(irq); for (port = 0; port < ARRAY_SIZE(pdata->overcurrent_pin); port++) { - if (pdata->overcurrent_pin[port] == gpio) + if (gpio_to_irq(pdata->overcurrent_pin[port]) == irq) { + gpio = pdata->overcurrent_pin[port]; break; + } } if (port == ARRAY_SIZE(pdata->overcurrent_pin)) {