Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

irqchip: 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().

Signed-off-by: Rob Herring <robh@kernel.org>
Acked-by: Guo Ren <guoren@kernel.org> (csky)
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20230310144710.1543070-1-robh@kernel.org

authored by

Rob Herring and committed by
Marc Zyngier
9dfc7791 23c7ff12

+2 -2
+1 -1
drivers/irqchip/irq-csky-apb-intc.c
··· 68 68 gc->chip_types[0].chip.irq_mask = irq_gc_mask_clr_bit; 69 69 gc->chip_types[0].chip.irq_unmask = irq_gc_mask_set_bit; 70 70 71 - if (of_find_property(node, "csky,support-pulse-signal", NULL)) 71 + if (of_property_read_bool(node, "csky,support-pulse-signal")) 72 72 gc->chip_types[0].chip.irq_unmask = irq_ck_mask_set_bit; 73 73 } 74 74
+1 -1
drivers/irqchip/irq-gic-v2m.c
··· 421 421 u32 spi_start = 0, nr_spis = 0; 422 422 struct resource res; 423 423 424 - if (!of_find_property(child, "msi-controller", NULL)) 424 + if (!of_property_read_bool(child, "msi-controller")) 425 425 continue; 426 426 427 427 ret = of_address_to_resource(child, 0, &res);