提交 5d891350 编写于 作者: A Andy Shevchenko 提交者: Bartosz Golaszewski

gpio: pca953x: Fix GPIO resource leak on Intel Galileo Gen 2

When adding a quirk for IRQ on Intel Galileo Gen 2 the commit ba8c90c6
("gpio: pca953x: Override IRQ for one of the expanders on Galileo Gen 2")
missed GPIO resource release. We can safely do this in the same quirk, since
IRQ will be locked by GPIO framework when requested and unlocked on freeing.

Fixes: ba8c90c6 ("gpio: pca953x: Override IRQ for one of the expanders on Galileo Gen 2")
Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Mika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: NMika Westerberg <mika.westerberg@linux.intel.com>
Reviewed-by: NLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
上级 ec3decd2
......@@ -176,7 +176,12 @@ static int pca953x_acpi_get_irq(struct device *dev)
if (ret)
return ret;
return gpio_to_irq(pin);
ret = gpio_to_irq(pin);
/* When pin is used as an IRQ, no need to keep it requested */
gpio_free(pin);
return ret;
}
#endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册