aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpiolib.c
diff options
context:
space:
mode:
authorBartosz Golaszewski <[email protected]>2025-05-19 11:10:43 +0000
committerBartosz Golaszewski <[email protected]>2025-05-20 06:45:27 +0000
commit274fd5fe911956cdebeeed65981b7182d57c2773 (patch)
tree4b21a8e894d322b1fac05a6a5b997daf05a43e35 /drivers/gpio/gpiolib.c
parentgpio: mpc8xxx: select GPIOLIB_IRQCHIP (diff)
downloadkernel-274fd5fe911956cdebeeed65981b7182d57c2773.tar.gz
kernel-274fd5fe911956cdebeeed65981b7182d57c2773.zip
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: Peng Fan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bartosz Golaszewski <[email protected]>
Diffstat (limited to 'drivers/gpio/gpiolib.c')
-rw-r--r--drivers/gpio/gpiolib.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index 87903847c3d7..a64647c9db75 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -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;