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

iio: adc: stm32-adc: Use generic_handle_domain_irq()

The call chain
generic_handle_irq(irq_find_mapping(domain, x));

could be replaced with
generic_handle_domain_irq(domain, x);

which looks up the struct irq_desc for the interrupt and handles it with
handle_irq_desc().
This is a slight optimisation given that the driver invokes only one
function and the struct irq_desc is used directly instead being looked
up via irq_to_desc().

Use generic_handle_domain_irq().

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Link: https://lore.kernel.org/r/YnuYoQIzJoFIyEJY@linutronix.de
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Sebastian Andrzej Siewior and committed by
Jonathan Cameron
88cb99da 82c89365

+1 -1
+1 -1
drivers/iio/adc/stm32-adc-core.c
··· 356 356 if ((status & priv->cfg->regs->eoc_msk[i] && 357 357 stm32_adc_eoc_enabled(priv, i)) || 358 358 (status & priv->cfg->regs->ovr_msk[i])) 359 - generic_handle_irq(irq_find_mapping(priv->domain, i)); 359 + generic_handle_domain_irq(priv->domain, i); 360 360 } 361 361 362 362 chained_irq_exit(chip, desc);