Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

gpio: siox: explicitly support only threaded irqs

The gpio-siox driver uses handle_nested_irq() to implement its
interrupt support. This is only capable of handling threaded irq
actions. For a hardirq action it triggers a NULL pointer oops.
(It calls action->thread_fn which is NULL then.)

Prevent registration of a hardirq action by setting
gpio_irq_chip::threaded to true.

Cc: u.kleine-koenig@pengutronix.de
Fixes: be8c8facc707 ("gpio: new driver to work with a 8x12 siox")
Cc: stable@vger.kernel.org
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>

authored by

Ahmad Fatoum and committed by
Bartosz Golaszewski
45ccf655 214b0e1a

+1
+1
drivers/gpio/gpio-siox.c
··· 245 245 girq->chip = &ddata->ichip; 246 246 girq->default_type = IRQ_TYPE_NONE; 247 247 girq->handler = handle_level_irq; 248 + girq->threaded = true; 248 249 249 250 ret = devm_gpiochip_add_data(dev, &ddata->gchip, NULL); 250 251 if (ret)