sparc: Use of_property_read_bool() for boolean properties
PATCH 1/1 sparc: 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]>
--- arch/sparc/kernel/pci_schizo.c | 2 +- arch/sparc/kernel/power.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
arch/sparc/kernel/pci_schizo.c +1 -1
@@ -1270,7 +1270,7 @@ static void schizo_pbm_hw_init(struct pci_pbm_info *pbm) pbm->chip_version >= 0x2) tmp |=0x3UL <<SCHIZO_PCICTRL_PTO_SHIFT ; -if (!of_find_property (pbm->op->dev.of_node,"no-bus-parking" ,NULL )) +if (!of_property_read_bool (pbm->op->dev.of_node,"no-bus-parking" )) tmp |=SCHIZO_PCICTRL_PARK ;else tmp &= ~SCHIZO_PCICTRL_PARK ;
arch/sparc/kernel/power.c +1 -1
@@ -28,7 +28,7 @@ static int has_button_interrupt(unsigned int irq, struct device_node *dp) {if (irq ==0xffffffff )return 0 ; -if (!of_find_property (dp,"button" ,NULL )) +if (!of_property_read_bool (dp,"button" ))return 0 ;return 1 ;
Signature · 1 line
2.39.2