summaryrefslogtreecommitdiff
path: root/drivers/regulator/stm32-vrefbuf.c
diff options
context:
space:
mode:
authorFabrice Gasnier <fabrice.gasnier@st.com>2018-02-08 14:43:05 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-03-15 10:54:28 +0100
commit4b26a307391ffb60197ef58e739fe28a666b6a72 (patch)
tree5305e1932b19da942e307e5f4e242d408bfc528f /drivers/regulator/stm32-vrefbuf.c
parentbba05fb6a13b355012bdca57dd0ae8218e6c51ee (diff)
regulator: stm32-vrefbuf: fix check on ready flag
commit f63248fac563125fd5a2f0bc780ce7a299872cab upstream. stm32_vrefbuf_enable() wrongly checks VRR bit: 0 stands for not ready, 1 for ready. It currently checks the opposite. This makes enable routine to exit immediately without waiting for ready flag. Fixes: 0cdbf481e927 ("regulator: Add support for stm32-vrefbuf") Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/regulator/stm32-vrefbuf.c')
-rw-r--r--drivers/regulator/stm32-vrefbuf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/regulator/stm32-vrefbuf.c b/drivers/regulator/stm32-vrefbuf.c
index 72c8b3e1022b..e0a9c445ed67 100644
--- a/drivers/regulator/stm32-vrefbuf.c
+++ b/drivers/regulator/stm32-vrefbuf.c
@@ -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);