summaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq/cpufreq-dt-platdev.c
diff options
context:
space:
mode:
authorRob Herring <robh@kernel.org>2023-03-10 15:47:02 +0100
committerViresh Kumar <viresh.kumar@linaro.org>2023-03-13 05:28:11 +0100
commitb8f3a396a7ee43e6079176cc0fb8de2b95a23681 (patch)
tree1de7073712435bbb6ee7aa5db6ab1fbc06960214 /drivers/cpufreq/cpufreq-dt-platdev.c
parentcpufreq: qcom-hw: Simplify counting frequency domains (diff)
downloadlinux-b8f3a396a7ee43e6079176cc0fb8de2b95a23681.tar.xz
linux-b8f3a396a7ee43e6079176cc0fb8de2b95a23681.zip
cpufreq: 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. Signed-off-by: Rob Herring <robh@kernel.org> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Diffstat (limited to 'drivers/cpufreq/cpufreq-dt-platdev.c')
-rw-r--r--drivers/cpufreq/cpufreq-dt-platdev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/cpufreq/cpufreq-dt-platdev.c b/drivers/cpufreq/cpufreq-dt-platdev.c
index e85703651098..5ac6b9e5270e 100644
--- a/drivers/cpufreq/cpufreq-dt-platdev.c
+++ b/drivers/cpufreq/cpufreq-dt-platdev.c
@@ -179,7 +179,7 @@ static bool __init cpu0_node_has_opp_v2_prop(void)
struct device_node *np = of_cpu_device_node_get(0);
bool ret = false;
- if (of_get_property(np, "operating-points-v2", NULL))
+ if (of_property_present(np, "operating-points-v2"))
ret = true;
of_node_put(np);