diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index 91628edad2c6..358f0ad9d0f8 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c @@ -1368,16 +1368,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, - * i.e. while gpiochip is still being brought up. - */ - if (!gc->irq.initialized) - return -EPROBE_DEFER; -#endif - if (!gpiochip_irqchip_irq_valid(gc, offset)) return -ENXIO; @@ -1562,15 +1552,6 @@ static int gpiochip_add_irqchip(struct gpio_chip *gc, acpi_gpiochip_request_interrupts(gc); - /* - * Using barrier() here to prevent compiler from reordering - * gc->irq.initialized before initialization of above - * GPIO chip irq members. - */ - barrier(); - - gc->irq.initialized = true; - return 0; } diff --git a/include/linux/gpio/driver.h b/include/linux/gpio/driver.h index e3c29d2e6826..a0f9901dcae6 100644 --- a/include/linux/gpio/driver.h +++ b/include/linux/gpio/driver.h @@ -224,15 +224,6 @@ struct gpio_irq_chip { unsigned long *valid_mask, unsigned int ngpios); - /** - * @initialized: - * - * Flag to track GPIO chip irq member's initialization. - * This flag will make sure GPIO chip irq members are not used - * before they are initialized. - */ - bool initialized; - /** * @valid_mask: *