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

Configure Feed

Select the types of activity you want to include in your feed.

uio: uio_pdrv_genirq: Make use of irq_get_trigger_type()

Convert the following case:

struct irq_data *irq_data = irq_get_irq_data(irq);

if (irq_data && irqd_get_trigger_type(irq_data) ... ) {
...
}

to the simpler:

if (irq_get_trigger_type(irq) ... ) {
...
}

by using the irq_get_trigger_type() function.

Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Vasileios Amoiridis <vassilisamir@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20240912235925.54465-3-vassilisamir@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Vasileios Amoiridis and committed by
Greg Kroah-Hartman
dcf6e7cf 2d23bc3c

+1 -4
+1 -4
drivers/uio/uio_pdrv_genirq.c
··· 173 173 } 174 174 175 175 if (uioinfo->irq) { 176 - struct irq_data *irq_data = irq_get_irq_data(uioinfo->irq); 177 - 178 176 /* 179 177 * If a level interrupt, dont do lazy disable. Otherwise the 180 178 * irq will fire again since clearing of the actual cause, on ··· 180 182 * irqd_is_level_type() isn't used since isn't valid until 181 183 * irq is configured. 182 184 */ 183 - if (irq_data && 184 - irqd_get_trigger_type(irq_data) & IRQ_TYPE_LEVEL_MASK) { 185 + if (irq_get_trigger_type(uioinfo->irq) & IRQ_TYPE_LEVEL_MASK) { 185 186 dev_dbg(&pdev->dev, "disable lazy unmask\n"); 186 187 irq_set_status_flags(uioinfo->irq, IRQ_DISABLE_UNLAZY); 187 188 }