Message ID | 1488644620-11488-9-git-send-email-bgolaszewski@baylibre.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Saturday 04 March 2017 09:53 PM, Bartosz Golaszewski wrote: > This driver never frees the interrupt descriptors it allocates. Fix > it by using the resource managed version of irq_alloc_descs(). > Acked-by: Keerthy <j-keerthy@ti.com> > Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com> > --- > drivers/gpio/gpio-davinci.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpio/gpio-davinci.c b/drivers/gpio/gpio-davinci.c > index 72f49d1..ac17357 100644 > --- a/drivers/gpio/gpio-davinci.c > +++ b/drivers/gpio/gpio-davinci.c > @@ -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; > -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Sat, Mar 4, 2017 at 5:23 PM, Bartosz Golaszewski <bgolaszewski@baylibre.com> wrote: > 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> Patch applied with Keerty's ACK. Yours, Linus Walleij -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/gpio/gpio-davinci.c b/drivers/gpio/gpio-davinci.c index 72f49d1..ac17357 100644 --- a/drivers/gpio/gpio-davinci.c +++ b/drivers/gpio/gpio-davinci.c @@ -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;
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> --- drivers/gpio/gpio-davinci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)