Skip to content

Commit 35b5f14

Browse files
geertubroonie
authored andcommitted
regulator: Fix resume from suspend to idle
When resuming from idle with the new suspend mode configuration support we go through the resume callbacks with a state of PM_SUSPEND_TO_IDLE which we don't have regulator constraints for, causing an error: dpm_run_callback(): regulator_resume_early+0x0/0x64 returns -22 PM: Device regulator.0 failed to resume early: error -22 Avoid this and similar errors by treating missing constraints as a noop. See also commit 57a0dd1 ("regulator: Fix suspend to idle"), which fixed the suspend part. Signed-off-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Mark Brown <[email protected]>
1 parent 7928b2c commit 35b5f14

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/regulator/core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4310,7 +4310,7 @@ static int _regulator_resume_early(struct device *dev, void *data)
43104310

43114311
rstate = regulator_get_suspend_state(rdev, *state);
43124312
if (rstate == NULL)
4313-
return -EINVAL;
4313+
return 0;
43144314

43154315
mutex_lock(&rdev->mutex);
43164316

0 commit comments

Comments
 (0)