Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

gpio: lpc18xx: fix GPIO controller driver build as a module

The problem is reported for allmodconfig build setup:

ERROR: "irq_chip_retrigger_hierarchy" [drivers/gpio/gpio-lpc18xx.ko] undefined!
make[2]: *** [scripts/Makefile.modpost:92: __modpost] Error 1
make[1]: *** [Makefile:1271: modules] Error 2

My testing in runtime shows that it is sufficient to remove .irq_retrigger
callback, which is assigned to unexported irq_chip_retrigger_hierarchy()
function, I did't observe any regressions, and thus apparently it is a
better fix rather than exporting the function defined in kernel/irq/chip.c
(see commit 52b2a05fa7c8 ("genirq: Export IRQ functions for module use"))
or sticking the GPIO controller driver build to built-in option only.

Reported-by: kbuild test robot <lkp@intel.com>
Fixes: 5ddabfe8d3de ("gpio: lpc18xx: add GPIO pin interrupt controller support")
Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

authored by

Vladimir Zapolskiy and committed by
Linus Walleij
67566ae4 b00b7980

-2
-2
drivers/gpio/gpio-lpc18xx.c
··· 11 11 #include <linux/gpio/driver.h> 12 12 #include <linux/io.h> 13 13 #include <linux/irqdomain.h> 14 - #include <linux/irqchip.h> 15 14 #include <linux/module.h> 16 15 #include <linux/of.h> 17 16 #include <linux/of_address.h> ··· 157 158 .irq_unmask = lpc18xx_gpio_pin_ic_unmask, 158 159 .irq_eoi = lpc18xx_gpio_pin_ic_eoi, 159 160 .irq_set_type = lpc18xx_gpio_pin_ic_set_type, 160 - .irq_retrigger = irq_chip_retrigger_hierarchy, 161 161 .flags = IRQCHIP_SET_TYPE_MASKED, 162 162 }; 163 163