summaryrefslogtreecommitdiff
path: root/drivers/uio
diff options
context:
space:
mode:
authorVasileios Amoiridis <vassilisamir@gmail.com>2024-09-13 01:59:24 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-10-13 17:16:28 +0200
commit2d23bc3c14fb6b08232f267bf15cf40cfce783b5 (patch)
tree5d7a583fe242d4fd599bfb4bd7ba0b122ce29bc4 /drivers/uio
parent1bca6ee0d077abbaafa4ab1167d6d31659c1edbb (diff)
uio: uio_dmem_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-2-vassilisamir@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/uio')
-rw-r--r--drivers/uio/uio_dmem_genirq.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/uio/uio_dmem_genirq.c b/drivers/uio/uio_dmem_genirq.c
index 13cc35ab5d29..c70dd81bfc61 100644
--- a/drivers/uio/uio_dmem_genirq.c
+++ b/drivers/uio/uio_dmem_genirq.c
@@ -210,8 +210,6 @@ static int uio_dmem_genirq_probe(struct platform_device *pdev)
}
if (uioinfo->irq) {
- struct irq_data *irq_data = irq_get_irq_data(uioinfo->irq);
-
/*
* If a level interrupt, dont do lazy disable. Otherwise the
* irq will fire again since clearing of the actual cause, on
@@ -219,8 +217,7 @@ static int uio_dmem_genirq_probe(struct platform_device *pdev)
* irqd_is_level_type() isn't used since isn't valid until
* irq is configured.
*/
- if (irq_data &&
- irqd_get_trigger_type(irq_data) & IRQ_TYPE_LEVEL_MASK) {
+ if (irq_get_trigger_type(uioinfo->irq) & IRQ_TYPE_LEVEL_MASK) {
dev_dbg(&pdev->dev, "disable lazy unmask\n");
irq_set_status_flags(uioinfo->irq, IRQ_DISABLE_UNLAZY);
}