|
@@ -3807,9 +3807,11 @@ int regulator_suspend_finish(void)
|
|
|
list_for_each_entry(rdev, ®ulator_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;
|