Commit 0423cace authored by Vasileios Amoiridis's avatar Vasileios Amoiridis Committed by Rob Herring (Arm)

of/irq: Use helper to define resources

Resources definition can become simpler and more organised by using the
dedicated helpers.
Suggested-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarVasileios Amoiridis <vassilisamir@gmail.com>
Reviewed-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20240912221605.27089-3-vassilisamir@gmail.comSigned-off-by: default avatarRob Herring (Arm) <robh@kernel.org>
parent ba3c92ba
......@@ -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,
&name);
r->start = r->end = irq;
r->flags = IORESOURCE_IRQ | irq_get_trigger_type(irq);
r->name = name ? name : of_node_full_name(dev);
*r = DEFINE_RES_IRQ_NAMED(irq, name ?: of_node_full_name(dev));
r->flags |= irq_get_trigger_type(irq);
}
return irq;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment