Skip to content

Commit

Permalink
regulator: core.c: Improve a comment
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sebastian Fricke authored and Mark Brown committed Apr 21, 2021

Unverified

No user is associated with the committer email.
1 parent 8a065ce commit 72241e3
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/regulator/core.c
Original file line number Diff line number Diff line change
@@ -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,

0 comments on commit 72241e3

Please sign in to comment.