summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/regulator/core.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index b7984044232d..2dfffca10dec 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -3631,9 +3631,11 @@ int regulator_suspend_finish(void)
list_for_each_entry(rdev, &regulator_list, list) {
mutex_lock(&rdev->mutex);
if (rdev->use_count > 0 || rdev->constraints->always_on) {
- error = _regulator_do_enable(rdev);
- if (error)
- ret = error;
+ if (!_regulator_is_enabled(rdev)) {
+ error = _regulator_do_enable(rdev);
+ if (error)
+ ret = error;
+ }
} else {
if (!have_full_constraints())
goto unlock;