1

of/irq: Use helper to define resources

Resources definition can become simpler and more organised by using the
dedicated helpers.

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/20240912221605.27089-3-vassilisamir@gmail.com
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
This commit is contained in:
Vasileios Amoiridis 2024-09-13 00:16:05 +02:00 committed by Rob Herring (Arm)
parent ba3c92ba09
commit 0423caceb4

View File

@ -429,9 +429,8 @@ int of_irq_to_resource(struct device_node *dev, int index, struct resource *r)
of_property_read_string_index(dev, "interrupt-names", index, of_property_read_string_index(dev, "interrupt-names", index,
&name); &name);
r->start = r->end = irq; *r = DEFINE_RES_IRQ_NAMED(irq, name ?: of_node_full_name(dev));
r->flags = IORESOURCE_IRQ | irq_get_trigger_type(irq); r->flags |= irq_get_trigger_type(irq);
r->name = name ? name : of_node_full_name(dev);
} }
return irq; return irq;