]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
gpiolib: remove unneeded #ifdef
authorBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Mon, 19 May 2025 11:10:43 +0000 (13:10 +0200)
committerBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Tue, 20 May 2025 06:45:27 +0000 (08:45 +0200)
We are already within another `#ifdef CONFIG_GPIOLIB_IRQCHIP` in
gpiochip_to_irq() so there's no need for another guard. Remove it.

Acked-by: Peng Fan <peng.fan@nxp.com>
Link: https://lore.kernel.org/r/20250519-gpio-irq-kconfig-fixes-v1-3-fe6ba1c6116d@linaro.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
drivers/gpio/gpiolib.c

index 87903847c3d7f7520138e4ae8ff525dfaba5feb5..a64647c9db75c7ac60fc5ccfa3d5aeee6c7c6308 100644 (file)
@@ -1888,7 +1888,6 @@ static int gpiochip_to_irq(struct gpio_chip *gc, unsigned int offset)
 {
        struct irq_domain *domain = gc->irq.domain;
 
-#ifdef CONFIG_GPIOLIB_IRQCHIP
        /*
         * Avoid race condition with other code, which tries to lookup
         * an IRQ before the irqchip has been properly registered,
@@ -1896,7 +1895,6 @@ static int gpiochip_to_irq(struct gpio_chip *gc, unsigned int offset)
         */
        if (!gc->irq.initialized)
                return -EPROBE_DEFER;
-#endif
 
        if (!gpiochip_irqchip_irq_valid(gc, offset))
                return -ENXIO;