Skip to content

Commit

Permalink
USB: atmel_usba_udc: fix freeing irq in usba_udc_remove()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Rob Emanuele authored and Greg Kroah-Hartman committed Dec 16, 2010
1 parent 6ef9fc6 commit 2c8245c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/usb/gadget/atmel_usba_udc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 2c8245c

Please sign in to comment.