summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Ferre <nicolas.ferre@atmel.com>2012-04-16 10:58:12 +0200
committerNicolas Ferre <nicolas.ferre@atmel.com>2012-04-17 16:29:41 +0200
commit70756027b0a01cb0bebf2e20d8d28e8103025734 (patch)
tree7a0cb480db307c7538a00faadae8e81b3791a4fe
parentb548a27b2e92ad171cc8b8d00bac5e15bb2d2956 (diff)
downloadlinux-70756027b0a01cb0bebf2e20d8d28e8103025734.tar.gz
linux-70756027b0a01cb0bebf2e20d8d28e8103025734.tar.bz2
linux-70756027b0a01cb0bebf2e20d8d28e8103025734.zip
USB: gadget/at91_udc: add gpio_to_irq() function to vbus interrupt
Now that we are using irqdomains, we need to convert GPIO pins to Linux IRQ numbers using the gpio_to_irq() function. This call is added to request/free_irq calls. Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Acked-by: Felipe Balbi <balbi@ti.com> Cc: linux-usb@vger.kernel.org
-rw-r--r--drivers/usb/gadget/at91_udc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/usb/gadget/at91_udc.c b/drivers/usb/gadget/at91_udc.c
index 0c935d7c65bd..9d7bcd910074 100644
--- a/drivers/usb/gadget/at91_udc.c
+++ b/drivers/usb/gadget/at91_udc.c
@@ -1863,8 +1863,8 @@ static int __devinit at91udc_probe(struct platform_device *pdev)
mod_timer(&udc->vbus_timer,
jiffies + VBUS_POLL_TIMEOUT);
} else {
- if (request_irq(udc->board.vbus_pin, at91_vbus_irq,
- 0, driver_name, udc)) {
+ if (request_irq(gpio_to_irq(udc->board.vbus_pin),
+ at91_vbus_irq, 0, driver_name, udc)) {
DBG("request vbus irq %d failed\n",
udc->board.vbus_pin);
retval = -EBUSY;
@@ -1886,7 +1886,7 @@ static int __devinit at91udc_probe(struct platform_device *pdev)
return 0;
fail4:
if (gpio_is_valid(udc->board.vbus_pin) && !udc->board.vbus_polled)
- free_irq(udc->board.vbus_pin, udc);
+ free_irq(gpio_to_irq(udc->board.vbus_pin), udc);
fail3:
if (gpio_is_valid(udc->board.vbus_pin))
gpio_free(udc->board.vbus_pin);
@@ -1924,7 +1924,7 @@ static int __exit at91udc_remove(struct platform_device *pdev)
device_init_wakeup(&pdev->dev, 0);
remove_debug_file(udc);
if (gpio_is_valid(udc->board.vbus_pin)) {
- free_irq(udc->board.vbus_pin, udc);
+ free_irq(gpio_to_irq(udc->board.vbus_pin), udc);
gpio_free(udc->board.vbus_pin);
}
free_irq(udc->udp_irq, udc);