Skip to content

Commit

Permalink
regulator: Fix suspend to idle
Browse files Browse the repository at this point in the history
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 <geert+renesas@glider.be>
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Mark Brown committed Jan 30, 2018
1 parent 4e79f3f commit 57a0dd1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/regulator/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -758,7 +758,7 @@ static int suspend_set_state(struct regulator_dev *rdev,

rstate = regulator_get_suspend_state(rdev, state);
if (rstate == NULL)
return -EINVAL;
return 0;

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

0 comments on commit 57a0dd1

Please sign in to comment.