diff options
author | Ben Dooks <ben.dooks@codethink.co.uk> | 2014-06-17 16:15:00 +0100 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2014-06-30 12:26:28 -0500 |
commit | 4b526951c356c9270f1737ca4e100e9b420d8223 (patch) | |
tree | 406ca8b075ef68e1c05fe6f0bc7c56a9beab5776 | |
parent | 3d7037b76ba81a35daf627391b67be6463e56353 (diff) | |
download | blackbird-op-linux-4b526951c356c9270f1737ca4e100e9b420d8223.tar.gz blackbird-op-linux-4b526951c356c9270f1737ca4e100e9b420d8223.zip |
usb: gadget: r8a66597-udc: use devm_request_irq() to get device irq
Use the devm_request_irq() call to get the interrupt for the
device and have it automatically free on exit.
Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
Signed-off-by: Felipe Balbi <balbi@ti.com>
-rw-r--r-- | drivers/usb/gadget/r8a66597-udc.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/usb/gadget/r8a66597-udc.c b/drivers/usb/gadget/r8a66597-udc.c index 51eaedda2bb5..8414ba501d7c 100644 --- a/drivers/usb/gadget/r8a66597-udc.c +++ b/drivers/usb/gadget/r8a66597-udc.c @@ -1826,7 +1826,6 @@ static int __exit r8a66597_remove(struct platform_device *pdev) usb_del_gadget_udc(&r8a66597->gadget); del_timer_sync(&r8a66597->timer); - free_irq(platform_get_irq(pdev, 0), r8a66597); r8a66597_free_request(&r8a66597->ep[0].ep, r8a66597->ep0_req); if (r8a66597->pdata->on_chip) { @@ -1918,8 +1917,8 @@ static int __init r8a66597_probe(struct platform_device *pdev) disable_controller(r8a66597); /* make sure controller is disabled */ - ret = request_irq(irq, r8a66597_irq, IRQF_SHARED, - udc_name, r8a66597); + ret = devm_request_irq(dev, irq, r8a66597_irq, IRQF_SHARED, + udc_name, r8a66597); if (ret < 0) { dev_err(dev, "request_irq error (%d)\n", ret); goto clean_up2; @@ -1969,7 +1968,6 @@ static int __init r8a66597_probe(struct platform_device *pdev) err_add_udc: r8a66597_free_request(&r8a66597->ep[0].ep, r8a66597->ep0_req); clean_up3: - free_irq(irq, r8a66597); clean_up2: if (r8a66597->pdata->on_chip) clk_disable_unprepare(r8a66597->clk); |