Skip to content

Commit 0423cac

Browse files
vamoiridrobherring
authored andcommitted
of/irq: Use helper to define resources
Resources definition can become simpler and more organised by using the dedicated helpers. Suggested-by: Andy Shevchenko <[email protected]> Signed-off-by: Vasileios Amoiridis <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Rob Herring (Arm) <[email protected]>
1 parent ba3c92b commit 0423cac

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

drivers/of/irq.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -429,9 +429,8 @@ int of_irq_to_resource(struct device_node *dev, int index, struct resource *r)
429429
of_property_read_string_index(dev, "interrupt-names", index,
430430
&name);
431431

432-
r->start = r->end = irq;
433-
r->flags = IORESOURCE_IRQ | irq_get_trigger_type(irq);
434-
r->name = name ? name : of_node_full_name(dev);
432+
*r = DEFINE_RES_IRQ_NAMED(irq, name ?: of_node_full_name(dev));
433+
r->flags |= irq_get_trigger_type(irq);
435434
}
436435

437436
return irq;

0 commit comments

Comments
 (0)