Files
Peng Fan 205cccd06e gpio: mxc: fix race between gpiochip registration and IRQ domain setup
devm_gpiochip_add_data() makes the GPIO chip visible to consumers
immediately. Since the chip sets .to_irq = mxc_gpio_to_irq, which calls
irq_find_mapping(port->domain, offset), any to_irq() call between
gpiochip registration and IRQ domain creation will operate on a NULL
domain.

Fix by moving devm_gpiochip_add_data() after the IRQ domain and generic
irq chip are fully initialized, ensuring port->domain and the irq chip
handlers are ready before the chip becomes visible to consumers.

Fixes: d37a65bb46 ("gpio/mxc: Move Freescale MXC gpio driver to drivers/gpio")
Signed-off-by: Peng Fan <[email protected]>
Reviewed-by: Linus Walleij <[email protected]>
Reviewed-by: Frank Li <[email protected]>
Reviewed-by: Andy Shevchenko <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Bartosz Golaszewski <[email protected]>
2026-10-15 14:21:15 +02:00
..
2026-08-10 12:55:34 +02:00
2026-08-10 12:55:34 +02:00
2026-08-10 12:55:34 +02:00
2026-08-10 12:55:34 +02:00
2025-11-25 14:10:07 +01:00
2026-03-16 09:51:05 +01:00