mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 04:18:39 +08:00
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:
parent
ba3c92ba09
commit
0423caceb4
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user