summaryrefslogtreecommitdiff
path: root/arch/sparc/kernel/time_32.c
diff options
context:
space:
mode:
authorRob Herring <robh@kernel.org>2023-03-10 08:46:59 -0600
committerRob Herring <robh@kernel.org>2023-04-18 11:23:21 -0500
commit6a71ca744bb52d222f821c6239aa44ffa16e5937 (patch)
tree28e4c5ab1d3067f7416b69b9ffbf869287765b33 /arch/sparc/kernel/time_32.c
parent6bb1504d5fe10e4ccf0b5318525948c86d5aa915 (diff)
sparc: Use of_property_present() for testing DT property presence
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. As part of this, convert of_get_property/of_find_property calls to the recently added of_property_present() helper when we just want to test for presence of a property and nothing more. Link: https://lore.kernel.org/r/20230310144659.1541247-1-robh@kernel.org Signed-off-by: Rob Herring <robh@kernel.org>
Diffstat (limited to 'arch/sparc/kernel/time_32.c')
-rw-r--r--arch/sparc/kernel/time_32.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/sparc/kernel/time_32.c b/arch/sparc/kernel/time_32.c
index 8a08830e4a65..958c2cf4479b 100644
--- a/arch/sparc/kernel/time_32.c
+++ b/arch/sparc/kernel/time_32.c
@@ -277,7 +277,7 @@ static int clock_probe(struct platform_device *op)
return -ENODEV;
/* Only the primary RTC has an address property */
- if (!of_find_property(dp, "address", NULL))
+ if (!of_property_present(dp, "address"))
return -ENODEV;
m48t59_rtc.resource = &op->resource[0];