diff options
author | Rob Herring <robh@kernel.org> | 2023-03-10 08:47:00 -0600 |
---|---|---|
committer | Rob Herring <robh@kernel.org> | 2023-04-18 11:23:24 -0500 |
commit | 928f4de0c03eb2eddd172395809094135fd879f7 (patch) | |
tree | b2bcdc476511f55cb345bdc5ab60f551e7435949 | |
parent | 6a71ca744bb52d222f821c6239aa44ffa16e5937 (diff) |
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().
Link: https://lore.kernel.org/r/20230310144700.1541345-1-robh@kernel.org
Signed-off-by: Rob Herring <robh@kernel.org>
-rw-r--r-- | arch/sparc/kernel/pci_schizo.c | 2 | ||||
-rw-r--r-- | arch/sparc/kernel/power.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/arch/sparc/kernel/pci_schizo.c b/arch/sparc/kernel/pci_schizo.c index 421aba00e6b0..23b47f7fdb1d 100644 --- a/arch/sparc/kernel/pci_schizo.c +++ b/arch/sparc/kernel/pci_schizo.c @@ -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; diff --git a/arch/sparc/kernel/power.c b/arch/sparc/kernel/power.c index d941875dd718..8147985a1dc4 100644 --- a/arch/sparc/kernel/power.c +++ b/arch/sparc/kernel/power.c @@ -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; |