aboutsummaryrefslogtreecommitdiff
path: root/drivers/regulator/max8998.c
diff options
context:
space:
mode:
authorGravatar Rob Herring <robh@kernel.org> 2023-03-10 08:47:22 -0600
committerGravatar Mark Brown <broonie@kernel.org> 2023-03-11 12:13:42 +0000
commit5bd73a162bc881dbb98ff9909dd865286852ee2b (patch)
tree75c47e308b8be46a7a2f2454b6c3b8441894956c /drivers/regulator/max8998.c
parentregulator: Use of_property_present() for testing DT property presence (diff)
downloadlinux-5bd73a162bc881dbb98ff9909dd865286852ee2b.tar.gz
linux-5bd73a162bc881dbb98ff9909dd865286852ee2b.tar.bz2
linux-5bd73a162bc881dbb98ff9909dd865286852ee2b.zip
regulator: 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> Link: https://lore.kernel.org/r/20230310144722.1544843-1-robh@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/regulator/max8998.c')
-rw-r--r--drivers/regulator/max8998.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/regulator/max8998.c b/drivers/regulator/max8998.c
index ac69bdd398cb..7f254066237d 100644
--- a/drivers/regulator/max8998.c
+++ b/drivers/regulator/max8998.c
@@ -618,8 +618,7 @@ static int max8998_pmic_dt_parse_pdata(struct max8998_dev *iodev,
if (ret)
return -EINVAL;
- if (of_find_property(pmic_np, "max8998,pmic-buck-voltage-lock", NULL))
- pdata->buck_voltage_lock = true;
+ pdata->buck_voltage_lock = of_property_read_bool(pmic_np, "max8998,pmic-buck-voltage-lock");
ret = of_property_read_u32(pmic_np,
"max8998,pmic-buck1-default-dvs-idx",