Merge tag 'regulator-fix-v4.16-rc4' of git://git.kernel.org/pub/scm/linux/kernel...
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 7 Mar 2018 18:54:11 +0000 (10:54 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 7 Mar 2018 18:54:11 +0000 (10:54 -0800)
Pull regulator fixes from Mark Brown:
 "A couple of fixes here:

   - another half of the supend to idle fix from Geert that went in
     earlier, both he and I are confused as to why he didn't notice that
     this was missing when his earlier fix was merged.

   - a simple fix for a test done the wrong way round in the
     stm32-vrefbuf driver"

* tag 'regulator-fix-v4.16-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
  regulator: Fix resume from suspend to idle
  regulator: stm32-vrefbuf: fix check on ready flag

drivers/regulator/core.c
drivers/regulator/stm32-vrefbuf.c

index dd4708c58480d277e0346f9b287831b080f8af6b..1fc0c0811da4e9f2e528c21cbc4578bbe5a32077 100644 (file)
@@ -4310,7 +4310,7 @@ static int _regulator_resume_early(struct device *dev, void *data)
 
        rstate = regulator_get_suspend_state(rdev, *state);
        if (rstate == NULL)
-               return -EINVAL;
+               return 0;
 
        mutex_lock(&rdev->mutex);
 
index 72c8b3e1022b4da5c83e90d20b0166f577aeced6..e0a9c445ed67ba39554e26d29dd9dc5dec3a5efd 100644 (file)
@@ -51,7 +51,7 @@ static int stm32_vrefbuf_enable(struct regulator_dev *rdev)
         * arbitrary timeout.
         */
        ret = readl_poll_timeout(priv->base + STM32_VREFBUF_CSR, val,
-                                !(val & STM32_VRR), 650, 10000);
+                                val & STM32_VRR, 650, 10000);
        if (ret) {
                dev_err(&rdev->dev, "stm32 vrefbuf timed out!\n");
                val = readl_relaxed(priv->base + STM32_VREFBUF_CSR);