Skip to content

Commit 83425c8

Browse files
robherringsre
authored andcommitted
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>
1 parent ef6d105 commit 83425c8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/power/supply/charger-manager.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1331,7 +1331,7 @@ static struct charger_desc *of_cm_parse_desc(struct device *dev)
13311331
of_property_read_string(np, "cm-thermal-zone", &desc->thermal_zone);
13321332

13331333
of_property_read_u32(np, "cm-battery-cold", &desc->temp_min);
1334-
if (of_get_property(np, "cm-battery-cold-in-minus", NULL))
1334+
if (of_property_read_bool(np, "cm-battery-cold-in-minus"))
13351335
desc->temp_min *= -1;
13361336
of_property_read_u32(np, "cm-battery-hot", &desc->temp_max);
13371337
of_property_read_u32(np, "cm-battery-temp-diff", &desc->temp_diff);

0 commit comments

Comments
 (0)