1
0
Fork 0

gpio: davinci: use devm_irq_alloc_descs()

This driver never frees the interrupt descriptors it allocates. Fix
it by using the resource managed version of irq_alloc_descs().

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Acked-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
hifive-unleashed-5.1
Bartosz Golaszewski 2017-03-04 17:23:36 +01:00 committed by Linus Walleij
parent bda61a192a
commit a1a3c2d551
1 changed files with 1 additions and 1 deletions

View File

@ -483,7 +483,7 @@ static int davinci_gpio_irq_setup(struct platform_device *pdev)
clk_prepare_enable(clk);
if (!pdata->gpio_unbanked) {
irq = irq_alloc_descs(-1, 0, ngpio, 0);
irq = devm_irq_alloc_descs(dev, -1, 0, ngpio, 0);
if (irq < 0) {
dev_err(dev, "Couldn't allocate IRQ numbers\n");
return irq;