Skip to content

Commit 9dfc779

Browse files
robherringMarc Zyngier
authored andcommitted
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 <[email protected]> Acked-by: Guo Ren <[email protected]> (csky) Signed-off-by: Marc Zyngier <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 23c7ff1 commit 9dfc779

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

drivers/irqchip/irq-csky-apb-intc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ static void __init ck_set_gc(struct device_node *node, void __iomem *reg_base,
6868
gc->chip_types[0].chip.irq_mask = irq_gc_mask_clr_bit;
6969
gc->chip_types[0].chip.irq_unmask = irq_gc_mask_set_bit;
7070

71-
if (of_find_property(node, "csky,support-pulse-signal", NULL))
71+
if (of_property_read_bool(node, "csky,support-pulse-signal"))
7272
gc->chip_types[0].chip.irq_unmask = irq_ck_mask_set_bit;
7373
}
7474

drivers/irqchip/irq-gic-v2m.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ static int __init gicv2m_of_init(struct fwnode_handle *parent_handle,
421421
u32 spi_start = 0, nr_spis = 0;
422422
struct resource res;
423423

424-
if (!of_find_property(child, "msi-controller", NULL))
424+
if (!of_property_read_bool(child, "msi-controller"))
425425
continue;
426426

427427
ret = of_address_to_resource(child, 0, &res);

0 commit comments

Comments
 (0)