Commit 274fd5fe authored by Bartosz Golaszewski's avatar Bartosz Golaszewski
Browse files

gpiolib: remove unneeded #ifdef



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: default avatarPeng Fan <peng.fan@nxp.com>
Link: https://lore.kernel.org/r/20250519-gpio-irq-kconfig-fixes-v1-3-fe6ba1c6116d@linaro.org


Signed-off-by: default avatarBartosz Golaszewski <bartosz.golaszewski@linaro.org>
parent 8da238b1
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -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;