提交 a1a3c2d5 编写于 作者: B Bartosz Golaszewski 提交者: Linus Walleij

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: NBartosz Golaszewski <bgolaszewski@baylibre.com>
Acked-by: NKeerthy <j-keerthy@ti.com>
Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
上级 bda61a19
...@@ -483,7 +483,7 @@ static int davinci_gpio_irq_setup(struct platform_device *pdev) ...@@ -483,7 +483,7 @@ static int davinci_gpio_irq_setup(struct platform_device *pdev)
clk_prepare_enable(clk); clk_prepare_enable(clk);
if (!pdata->gpio_unbanked) { 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) { if (irq < 0) {
dev_err(dev, "Couldn't allocate IRQ numbers\n"); dev_err(dev, "Couldn't allocate IRQ numbers\n");
return irq; return irq;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册