diff options
author | Rob Herring <robh@kernel.org> | 2023-03-10 08:47:22 -0600 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2023-03-11 12:13:42 +0000 |
commit | 5bd73a162bc881dbb98ff9909dd865286852ee2b (patch) | |
tree | 75c47e308b8be46a7a2f2454b6c3b8441894956c /drivers/regulator/stpmic1_regulator.c | |
parent | 7dda20c97fac52948b948e15e1173ee57c66ed35 (diff) | |
download | linux-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/stpmic1_regulator.c')
-rw-r--r-- | drivers/regulator/stpmic1_regulator.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/regulator/stpmic1_regulator.c b/drivers/regulator/stpmic1_regulator.c index 2d7597c76e4a..d04759b56a95 100644 --- a/drivers/regulator/stpmic1_regulator.c +++ b/drivers/regulator/stpmic1_regulator.c @@ -576,7 +576,7 @@ static int stpmic1_regulator_register(struct platform_device *pdev, int id, } /* set mask reset */ - if (of_get_property(config.of_node, "st,mask-reset", NULL) && + if (of_property_read_bool(config.of_node, "st,mask-reset") && cfg->mask_reset_reg != 0) { ret = regmap_update_bits(pmic_dev->regmap, cfg->mask_reset_reg, |