Use functionality of irq_get_trigger_type() and
v4 cover Use functionality of irq_get_trigger_type() and
The series is compile tested.
Changes in v4:
- Use Elvis operator in patch no.2
---
v3: https://lore.kernel.org/linux-devicetree/[email protected]/
Changes in v3:
- Fix syntax error in patch no.2
---
v2: https://lore.kernel.org/linux-devicetree/[email protected]/
Changes in v2:
- Split patches to subsystems
- Use DEFINE_* helpers to define resources
---
v1: https://lore.kernel.org/all/[email protected]/
28/11/2024Vasileios Amoiridis (2):
of/irq: Make use of irq_get_trigger_type()
of/irq: Use helper to define resources
drivers/of/irq.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
base-commit: 32ffa5373540a8d1c06619f52d019c6cdc948bb4
Signature · 1 line
2.25.1
PATCH v4 1/2 of/irq: Make use of irq_get_trigger_type()
Convert irqd_get_trigger_type(irq_get_irq_data(irq)) cases to the more simple irq_get_trigger_type(irq).
--- drivers/of/irq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/of/irq.c +1 -1
@@ -430,7 +430,7 @@ int of_irq_to_resource(struct device_node *dev, int index, struct resource *r) &name); r->start = r->end = irq; - r->flags =IORESOURCE_IRQ |irqd_get_trigger_type (irq_get_irq_data (irq)); + r->flags =IORESOURCE_IRQ |irq_get_trigger_type (irq); r->name = name ? name :of_node_full_name (dev); }
base-commit: 32ffa5373540a8d1c06619f52d019c6cdc948bb4
Signature · 1 line
2.25.1
PATCH v4 2/2 of/irq: Use helper to define resources
In reply to Vasileios AmoiridisResources definition can become simpler and more organised by using the dedicated helpers.
--- drivers/of/irq.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/of/irq.c +2 -3
@@ -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;
Signature · 1 line
2.25.1
Quoted 1 line · Vasileios Amoiridis
The series is compile tested.
LGTM, FWIW,
Signature · 2 lines
With Best Regards, Andy Shevchenko
Quoted 25 lines · Vasileios Amoiridis
The series is compile tested.
Changes in v4:
- Use Elvis operator in patch no.2---
v3: https://lore.kernel.org/linux-devicetree/[email protected]/Changes in v3:
- Fix syntax error in patch no.2---
v2: https://lore.kernel.org/linux-devicetree/[email protected]/Changes in v2:
- Split patches to subsystems
- Use DEFINE_* helpers to define resources---
v1: https://lore.kernel.org/all/[email protected]/28/11/2024Vasileios Amoiridis (2):
of/irq: Make use ofirq_get_trigger_type()
of/irq: Use helper to define resources
Quoted 10 lines
drivers/of/irq.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)base-commit:
32ffa5373540a8d1c06619f52d019c6cdc948bb4--
2.25.1
Applied, thanks!