gpio: fix gpio-adp5588 build errors [Linux 4.14.129]

gpio: fix gpio-adp5588 build errors [Linux 4.14.129]

This Linux kernel change "gpio: fix gpio-adp5588 build errors" is included in the Linux 4.14.129 release. This change is authored by Randy Dunlap <rdunlap [at] infradead.org> on Thu May 23 15:00:41 2019 -0700. The commit for this change in Linux stable tree is 05d7bbb (patch) which is from upstream commit e9646f0. The same Linux upstream change may have been applied to various maintained Linux releases and you can find all Linux releases containing changes from upstream e9646f0.

gpio: fix gpio-adp5588 build errors

[ Upstream commit e9646f0f5bb62b7d43f0968f39d536cfe7123b53 ]

The gpio-adp5588 driver uses interfaces that are provided by
GPIOLIB_IRQCHIP, so select that symbol in its Kconfig entry.

Fixes these build errors:

../drivers/gpio/gpio-adp5588.c: In function ‘adp5588_irq_handler’:
../drivers/gpio/gpio-adp5588.c:266:26: error: ‘struct gpio_chip’ has no member named ‘irq’
            dev->gpio_chip.irq.domain, gpio));
                          ^
../drivers/gpio/gpio-adp5588.c: In function ‘adp5588_irq_setup’:
../drivers/gpio/gpio-adp5588.c:298:2: error: implicit declaration of function ‘gpiochip_irqchip_add_nested’ [-Werror=implicit-function-declaration]
  ret = gpiochip_irqchip_add_nested(&dev->gpio_chip,
  ^
../drivers/gpio/gpio-adp5588.c:307:2: error: implicit declaration of function ‘gpiochip_set_nested_irqchip’ [-Werror=implicit-function-declaration]
  gpiochip_set_nested_irqchip(&dev->gpio_chip,
  ^

Fixes: 459773ae8dbb ("gpio: adp5588-gpio: support interrupt controller")
Reported-by: kbuild test robot <[email protected]>
Signed-off-by: Randy Dunlap <[email protected]>
Cc: [email protected]
Reviewed-by: Bartosz Golaszewski <[email protected]>
Acked-by: Michael Hennerich <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>

There is one line of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 drivers/gpio/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpio/Kconfig b/drivers/gpio/Kconfig
index 3f80f16..2357d2f 100644
--- a/drivers/gpio/Kconfig
+++ b/drivers/gpio/Kconfig
@@ -712,6 +712,7 @@ config GPIO_ADP5588
 config GPIO_ADP5588_IRQ
    bool "Interrupt controller support for ADP5588"
    depends on GPIO_ADP5588=y
+   select GPIOLIB_IRQCHIP
    help
      Say yes here to enable the adp5588 to be used as an interrupt
      controller. It requires the driver to be built in the kernel.

Leave a Reply

Your email address will not be published. Required fields are marked *