Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

gpio: pxa: 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: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

authored by

Bartosz Golaszewski and committed by
Linus Walleij
bda61a19 31bd86d9

+1 -1
+1 -1
drivers/gpio/gpio-pxa.c
··· 601 601 nr_gpios = gpio_id->gpio_nums; 602 602 pxa_last_gpio = nr_gpios - 1; 603 603 604 - irq_base = irq_alloc_descs(-1, 0, nr_gpios, 0); 604 + irq_base = devm_irq_alloc_descs(&pdev->dev, -1, 0, nr_gpios, 0); 605 605 if (irq_base < 0) { 606 606 dev_err(&pdev->dev, "Failed to allocate IRQ numbers\n"); 607 607 return irq_base;