aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMattias Wallin <mattias.wallin@stericsson.com>2010-11-02 09:55:34 -0400
committerLiam Girdwood <lrg@slimlogic.co.uk>2010-11-30 10:13:25 -0500
commitb12a1e29af595d05612153bcb85258193bbf9382 (patch)
tree700e2fdd4f0468498b90cf5fabc2b530c5417e0f /drivers
parente8a7e48bb248a1196484d3f8afa53bded2b24e71 (diff)
regulator: regulator disable supply fix
This patch fixes a disable failure when regulator supply is used. A while loop in regulator disable checks for supply pointer != NULL but the pointer is not always updated, resulting in the while loop running too many times causing a disable failure. Signed-off-by: Mattias Wallin <mattias.wallin@stericsson.com> Acked-by: Linus Walleij <linus.walleij@stericsson.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/regulator/core.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index f1d10c974cd4..c62563322969 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -1359,6 +1359,7 @@ static int _regulator_disable(struct regulator_dev *rdev,
1359 struct regulator_dev **supply_rdev_ptr) 1359 struct regulator_dev **supply_rdev_ptr)
1360{ 1360{
1361 int ret = 0; 1361 int ret = 0;
1362 *supply_rdev_ptr = NULL;
1362 1363
1363 if (WARN(rdev->use_count <= 0, 1364 if (WARN(rdev->use_count <= 0,
1364 "unbalanced disables for %s\n", 1365 "unbalanced disables for %s\n",