Skip to contentSkip to conversation

ARM: pxa: Use of_property_read_bool() for boolean properties

PATCH New Rob Herring 1 participant 1 message Mar 10, 2023

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: pxa: Use of_property_read_bool() for boolean properties

It is preferred to use typed property access functions (i.e. of_property_read_<type> functions) rather than low-level of_get_property/of_find_property functions for reading properties. Convert reading boolean properties to to of_property_read_bool().

---
 arch/arm/mach-pxa/irq.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
arch/arm/mach-pxa/irq.c +1 -2
index 96f33ef1d9ea..a9ef71008147 100644
@@ -257,8 +257,7 @@ void __init pxa_dt_irq_init(int (*fn)(struct irq_data *, unsigned int))
 	}
 	pxa_irq_base = io_p2v(res.start);
 
-	if (of_find_property(node, "marvell,intc-priority", NULL))
-		cpu_has_ipr = 1;
+	cpu_has_ipr = of_property_read_bool(node, "marvell,intc-priority");
 
 	ret = irq_alloc_descs(-1, 0, pxa_internal_irq_nr, 0);
 	if (ret < 0) {
Signature · 1 line
2.39.2