From: Rob Emanuele Date: Tue, 14 Dec 2010 18:00:30 +0000 (+0100) Subject: USB: atmel_usba_udc: fix freeing irq in usba_udc_remove() X-Git-Tag: v2.6.38-rc1~465^2~4 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=2c8245c4990e75d86ab30bb0af9bb90cbe04985d;p=karo-tx-linux.git USB: atmel_usba_udc: fix freeing irq in usba_udc_remove() Add a free_irq() call on vbus gpio when we remove udc so that the vbus irq is properly released. Signed-off-by: Rob Emanuele Signed-off-by: Nicolas Ferre Acked-by: Jean-Christophe PLAGNIOL-VILLARD Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/gadget/atmel_usba_udc.c b/drivers/usb/gadget/atmel_usba_udc.c index 717ff653fa23..e7c65a4408fb 100644 --- a/drivers/usb/gadget/atmel_usba_udc.c +++ b/drivers/usb/gadget/atmel_usba_udc.c @@ -2057,8 +2057,10 @@ static int __exit usba_udc_remove(struct platform_device *pdev) usba_ep_cleanup_debugfs(&usba_ep[i]); usba_cleanup_debugfs(udc); - if (gpio_is_valid(udc->vbus_pin)) + if (gpio_is_valid(udc->vbus_pin)) { + free_irq(gpio_to_irq(udc->vbus_pin), udc); gpio_free(udc->vbus_pin); + } free_irq(udc->irq, udc); kfree(usba_ep);