diff options
author | Bartosz Golaszewski <bgolaszewski@baylibre.com> | 2017-03-04 17:23:31 +0100 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2017-03-15 11:16:33 +0100 |
commit | 2ed36f30139f773e3c99eeca2307b7a6596f4b90 (patch) | |
tree | 0a39e6d3d81314125e37ae8f7b68bad919093526 /drivers/gpio | |
parent | 9bc81137e8082eaa73f1b116e1df2c75673d64df (diff) | |
download | linux-stable-2ed36f30139f773e3c99eeca2307b7a6596f4b90.tar.gz linux-stable-2ed36f30139f773e3c99eeca2307b7a6596f4b90.tar.bz2 linux-stable-2ed36f30139f773e3c99eeca2307b7a6596f4b90.zip |
gpio: omap: use devm_irq_alloc_descs()
This driver never frees the allocated interrupt descriptors. Fix it by
using a resource managed variant of irq_alloc_descs().
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio')
-rw-r--r-- | drivers/gpio/gpio-omap.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpio/gpio-omap.c b/drivers/gpio/gpio-omap.c index efc85a279d54..5d6a5744352f 100644 --- a/drivers/gpio/gpio-omap.c +++ b/drivers/gpio/gpio-omap.c @@ -1085,7 +1085,8 @@ static int omap_gpio_chip_init(struct gpio_bank *bank, struct irq_chip *irqc) * REVISIT: Once we have OMAP1 supporting SPARSE_IRQ, we can drop * irq_alloc_descs() since a base IRQ offset will no longer be needed. */ - irq_base = irq_alloc_descs(-1, 0, bank->width, 0); + irq_base = devm_irq_alloc_descs(bank->chip.parent, + -1, 0, bank->width, 0); if (irq_base < 0) { dev_err(bank->chip.parent, "Couldn't allocate IRQ numbers\n"); return -ENODEV; |