summaryrefslogtreecommitdiff
path: root/drivers/power
diff options
context:
space:
mode:
authorRob Herring <robh@kernel.org>2023-03-10 08:47:35 -0600
committerSebastian Reichel <sebastian.reichel@collabora.com>2023-03-12 23:33:43 +0100
commit83425c835e7dea49576aaac5fd4bff9b38ee0c32 (patch)
treecd32aace115c4099b27d2db37315d58e9a8c13e4 /drivers/power
parentef6d10568ca9ca622a867e5d059982251bbccd6b (diff)
power: supply: charger-manager: 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(). Signed-off-by: Rob Herring <robh@kernel.org> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Diffstat (limited to 'drivers/power')
-rw-r--r--drivers/power/supply/charger-manager.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/power/supply/charger-manager.c b/drivers/power/supply/charger-manager.c
index c9e8450c646f..5fa6ba7f41e1 100644
--- a/drivers/power/supply/charger-manager.c
+++ b/drivers/power/supply/charger-manager.c
@@ -1331,7 +1331,7 @@ static struct charger_desc *of_cm_parse_desc(struct device *dev)
of_property_read_string(np, "cm-thermal-zone", &desc->thermal_zone);
of_property_read_u32(np, "cm-battery-cold", &desc->temp_min);
- if (of_get_property(np, "cm-battery-cold-in-minus", NULL))
+ if (of_property_read_bool(np, "cm-battery-cold-in-minus"))
desc->temp_min *= -1;
of_property_read_u32(np, "cm-battery-hot", &desc->temp_max);
of_property_read_u32(np, "cm-battery-temp-diff", &desc->temp_diff);