summaryrefslogtreecommitdiffstats
path: root/drivers/regulator/twl6030-regulator.c
diff options
context:
space:
mode:
authorRob Herring <robh@kernel.org>2023-03-10 08:47:22 -0600
committerMark Brown <broonie@kernel.org>2023-03-11 12:13:42 +0000
commit5bd73a162bc881dbb98ff9909dd865286852ee2b (patch)
tree75c47e308b8be46a7a2f2454b6c3b8441894956c /drivers/regulator/twl6030-regulator.c
parent7dda20c97fac52948b948e15e1173ee57c66ed35 (diff)
downloadlinux-stable-5bd73a162bc881dbb98ff9909dd865286852ee2b.tar.gz
linux-stable-5bd73a162bc881dbb98ff9909dd865286852ee2b.tar.bz2
linux-stable-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/twl6030-regulator.c')
-rw-r--r--drivers/regulator/twl6030-regulator.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/regulator/twl6030-regulator.c b/drivers/regulator/twl6030-regulator.c
index f3856750944f..d94e61aa1b84 100644
--- a/drivers/regulator/twl6030-regulator.c
+++ b/drivers/regulator/twl6030-regulator.c
@@ -729,7 +729,7 @@ static int twlreg_probe(struct platform_device *pdev)
break;
}
- if (of_get_property(np, "ti,retain-on-reset", NULL))
+ if (of_property_read_bool(np, "ti,retain-on-reset"))
info->flags |= TWL_6030_WARM_RESET;
config.dev = &pdev->dev;