aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator/core.c
diff options
context:
space:
mode:
authorSebastian Fricke <sebastian.fricke@posteo.net>2021-04-21 05:52:37 +0000
committerMark Brown <broonie@kernel.org>2021-04-21 15:54:57 +0100
commit72241e3190f2be668d60493cf0343ec535357b5e (patch)
tree8f50b3956335700430389cf522105ae901ee1027 /drivers/regulator/core.c
parentregulator: Avoid a double 'of_node_get' in 'regulator_of_get_init_node()' (diff)
downloadlinux-dev-72241e3190f2be668d60493cf0343ec535357b5e.tar.xz
linux-dev-72241e3190f2be668d60493cf0343ec535357b5e.zip
regulator: core.c: Improve a comment
s/regulator may on/regulator may already be enabled/ s/or left on/or was left on/ The aim of this patch is to make the comment more readable and to make it clear, that this is about a regulator, that is already enabled instead of a regulator that may be switched on. Signed-off-by: Sebastian Fricke <sebastian.fricke@posteo.net> Link: https://lore.kernel.org/r/20210421055236.13148-1-sebastian.fricke@posteo.net Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/regulator/core.c')
-rw-r--r--drivers/regulator/core.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 06fbf18b6524..d31f5c3cd773 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -2654,7 +2654,10 @@ static int _regulator_enable(struct regulator *regulator)
goto err_disable_supply;
if (rdev->use_count == 0) {
- /* The regulator may on if it's not switchable or left on */
+ /*
+ * The regulator may already be enabled if it's not switchable
+ * or was left on
+ */
ret = _regulator_is_enabled(rdev);
if (ret == -EINVAL || ret == 0) {
if (!regulator_ops_is_valid(rdev,