gpio: dwapb: Call acpi_gpiochip_free_interrupts() on GPIO chip de-registration
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tue, 19 May 2020 13:12:30 +0000 (16:12 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 24 Jun 2020 15:48:26 +0000 (17:48 +0200)
commitf7004253e1d03b416fe2670c6f49630c948cd571
tree65e0a724847c8c21330f4b4775859e2cda0f53f1
parentcd2c9acd3b0b915f5afbd4f0a2ac83f9b56689ec
gpio: dwapb: Call acpi_gpiochip_free_interrupts() on GPIO chip de-registration

[ Upstream commit 494a94e38dcf62543a32a4424d646ff80b4b28bd ]

Add missed acpi_gpiochip_free_interrupts() call when unregistering ports.

While at it, drop extra check to call acpi_gpiochip_request_interrupts().
There is no need to have an additional check to call
acpi_gpiochip_request_interrupts(). Even without any interrupts available
the registered ACPI Event handlers can be useful for debugging purposes.

Fixes: e6cb3486f5a1 ("gpio: dwapb: add gpio-signaled acpi event support")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Serge Semin <fancer.lancer@gmail.com>
Acked-by: Serge Semin <fancer.lancer@gmail.com>
Link: https://lore.kernel.org/r/20200519131233.59032-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpio/gpio-dwapb.c