diff options
author | Rob Herring <robh@kernel.org> | 2023-03-10 15:47:26 +0100 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2023-03-30 19:26:44 +0200 |
commit | 86df7d19083c66fb1e2e1b3800f29586429a4d92 (patch) | |
tree | 64f52b56259e35e98a2eb9d2e6f7adc7db23b8a3 /drivers/thermal/ti-soc-thermal/ti-thermal-common.c | |
parent | thermal: thermal_hwmon: Revert recent message adjustment (diff) | |
download | linux-86df7d19083c66fb1e2e1b3800f29586429a4d92.tar.xz linux-86df7d19083c66fb1e2e1b3800f29586429a4d92.zip |
thermal: 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>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/thermal/ti-soc-thermal/ti-thermal-common.c')
-rw-r--r-- | drivers/thermal/ti-soc-thermal/ti-thermal-common.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/thermal/ti-soc-thermal/ti-thermal-common.c b/drivers/thermal/ti-soc-thermal/ti-thermal-common.c index 0c8914017c18..938ddf4fb328 100644 --- a/drivers/thermal/ti-soc-thermal/ti-thermal-common.c +++ b/drivers/thermal/ti-soc-thermal/ti-thermal-common.c @@ -223,7 +223,7 @@ int ti_thermal_register_cpu_cooling(struct ti_bandgap *bgp, int id) * using DT, then it must be aware that the cooling device * loading has to happen via cpufreq driver. */ - if (of_find_property(np, "#thermal-sensor-cells", NULL)) + if (of_property_present(np, "#thermal-sensor-cells")) return 0; data = ti_bandgap_get_sensor_data(bgp, id); |