Skip to content

Commit 57a0dd1

Browse files
committed
regulator: Fix suspend to idle
When suspending to idle with the new suspend mode configuration support we go through the suspend callbacks with a state of PM_SUSPEND_TO_IDLE which we don't have regulator constraints for, causing an error. Avoid this and similar errors by treating missing constraints as a noop. Reported-by: Geert Uytterhoeven <[email protected]> Tested-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Mark Brown <[email protected]>
1 parent 4e79f3f commit 57a0dd1

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
@@ -758,7 +758,7 @@ static int suspend_set_state(struct regulator_dev *rdev,
758758

759759
rstate = regulator_get_suspend_state(rdev, state);
760760
if (rstate == NULL)
761-
return -EINVAL;
761+
return 0;
762762

763763
/* If we have no suspend mode configration don't set anything;
764764
* only warn if the driver implements set_suspend_voltage or

0 commit comments

Comments
 (0)