USB: atmel_usba_udc: fix freeing irq in usba_udc_remove()
authorRob Emanuele <rje@crystalfontz.com>
Tue, 14 Dec 2010 18:00:30 +0000 (19:00 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 16 Dec 2010 21:36:12 +0000 (13:36 -0800)
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 <rje@crystalfontz.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/gadget/atmel_usba_udc.c

index 717ff653fa2330a9e5b78774b1a084f80186faf0..e7c65a4408fb6aa8f3344c198824a50ce8692fae 100644 (file)
@@ -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);