This is a note to let you know that I've just added the patch titled gpio: guard gpiochip_irqchip_add_domain() with GPIOLIB_IRQCHIP to the 5.10-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: gpio-guard-gpiochip_irqchip_add_domain-with-gpiolib_.patch and it can be found in the queue-5.10 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit ac6a022829f4b678812a2e66f9271825577a9bf5 Author: �lvaro Fernández Rojas <noltari@xxxxxxxxx> Date: Wed Mar 24 09:19:02 2021 +0100 gpio: guard gpiochip_irqchip_add_domain() with GPIOLIB_IRQCHIP [ Upstream commit 9c7d24693d864f90b27aad5d15fbfe226c02898b ] The current code doesn't check if GPIOLIB_IRQCHIP is enabled, which results in a compilation error when trying to build gpio-regmap if CONFIG_GPIOLIB_IRQCHIP isn't enabled. Fixes: 6a45b0e2589f ("gpiolib: Introduce gpiochip_irqchip_add_domain()") Suggested-by: Michael Walle <michael@xxxxxxxx> Signed-off-by: �lvaro Fernández Rojas <noltari@xxxxxxxxx> Reviewed-by: Linus Walleij <linus.walleij@xxxxxxxxxx> Reviewed-by: Michael Walle <michael@xxxxxxxx> Acked-by: Bartosz Golaszewski <bgolaszewski@xxxxxxxxxxxx> Link: https://lore.kernel.org/r/20210324081923.20379-2-noltari@xxxxxxxxx Signed-off-by: Linus Walleij <linus.walleij@xxxxxxxxxx> Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/include/linux/gpio/driver.h b/include/linux/gpio/driver.h index 4a7e295c3640..8e144306e262 100644 --- a/include/linux/gpio/driver.h +++ b/include/linux/gpio/driver.h @@ -637,8 +637,17 @@ int gpiochip_irqchip_add_key(struct gpio_chip *gc, bool gpiochip_irqchip_irq_valid(const struct gpio_chip *gc, unsigned int offset); +#ifdef CONFIG_GPIOLIB_IRQCHIP int gpiochip_irqchip_add_domain(struct gpio_chip *gc, struct irq_domain *domain); +#else +static inline int gpiochip_irqchip_add_domain(struct gpio_chip *gc, + struct irq_domain *domain) +{ + WARN_ON(1); + return -EINVAL; +} +#endif #ifdef CONFIG_LOCKDEP