regulator: Fix suspend to idle

Testing on mainline after the initial regulator pull request went in
 identified a regression for suspend to idle due to it calling the
 suspend operations with states that it wasn't realized could happen,
 this patch fixes the problem.
 -----BEGIN PGP SIGNATURE-----
 
 iQFHBAABCgAxFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAlp7HfgTHGJyb29uaWVA
 a2VybmVsLm9yZwAKCRAk1otyXVSH0IsVB/9iDT3sw3G547exEzg9A0f3DW1lo371
 dFpveQzhmRvdxM2X4NUYrwdtZkkU+7grX4zZ/YrFpf0WXptTvnX+q3jMXNYYtfLn
 2ts6S33qJSIQYwxQqgkq2Ny3HnhRbaTN0xGz3qLtWpLPd5bzn8pzv19AU4e7wPiy
 OXZv8NVsdye/6VUeHD6NGjiDAawXOOfWRpy5EMQ4Ze//AR/pWB8H8ghkGT9qY8gk
 o4ulH+zcBvLL5wfLHKhAZOa8SOQlvW8E7cKJ7eW2qHW9OO3JP2w/475+MkQKuGPa
 tqbHcmhLluemAf050Mbw8WEwVQon0PZpU8DimHbL5IXfi/u015qs2lnT
 =LouH
 -----END PGP SIGNATURE-----

Merge tag 'regulator-fix-v4.16-suspend' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator

Pull regulator fix from Mark Brown:
 "Fix suspend to idle.

  Testing on mainline after the initial regulator pull request went in
  identified a regression for suspend to idle due to it calling the
  suspend operations with states that it wasn't realized could happen,
  this patch fixes the problem"

* tag 'regulator-fix-v4.16-suspend' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
  regulator: Fix suspend to idle
This commit is contained in:
Linus Torvalds 2018-02-07 13:17:07 -08:00
commit ffefb18172

View file

@ -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