ARM: pxa: Use of_property_read_bool() for boolean properties
authorRob Herring <robh@kernel.org>
Fri, 10 Mar 2023 14:46:56 +0000 (08:46 -0600)
committerArnd Bergmann <arnd@arndb.de>
Fri, 14 Apr 2023 12:58:41 +0000 (14:58 +0200)
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().

Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
arch/arm/mach-pxa/irq.c

index 96f33ef1d9ea283e7e316d80777e60eb674dba0a..a9ef71008147293c5db931d1117e58cf555d0794 100644 (file)
@@ -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) {