summaryrefslogtreecommitdiff
path: root/drivers/thermal/imx8mm_thermal.c
diff options
context:
space:
mode:
authorRob Herring <robh@kernel.org>2023-03-10 17:47:26 +0300
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2023-03-30 20:26:44 +0300
commit86df7d19083c66fb1e2e1b3800f29586429a4d92 (patch)
tree64f52b56259e35e98a2eb9d2e6f7adc7db23b8a3 /drivers/thermal/imx8mm_thermal.c
parentd9dc06009b35dd2942561bf5c939a1c91bb5d9e4 (diff)
downloadlinux-86df7d19083c66fb1e2e1b3800f29586429a4d92.tar.xz
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/imx8mm_thermal.c')
-rw-r--r--drivers/thermal/imx8mm_thermal.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/thermal/imx8mm_thermal.c b/drivers/thermal/imx8mm_thermal.c
index e0de6ac49469..d8005e9ec992 100644
--- a/drivers/thermal/imx8mm_thermal.c
+++ b/drivers/thermal/imx8mm_thermal.c
@@ -282,7 +282,7 @@ static int imx8mm_tmu_probe_set_calib(struct platform_device *pdev,
* strongly recommended to update such old DTs to get correct
* temperature compensation values for each SoC.
*/
- if (!of_find_property(pdev->dev.of_node, "nvmem-cells", NULL)) {
+ if (!of_property_present(pdev->dev.of_node, "nvmem-cells")) {
dev_warn(dev,
"No OCOTP nvmem reference found, SoC-specific calibration not loaded. Please update your DT.\n");
return 0;