summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-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 e873e8f0070d..e389594b4921 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -3788,9 +3788,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 (!has_full_constraints)
goto unlock;