public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] regulator: regulator disable supply fix
@ 2010-11-02 12:22 Mattias Wallin
  2010-11-02 13:19 ` Mark Brown
  0 siblings, 1 reply; 4+ messages in thread
From: Mattias Wallin @ 2010-11-02 12:22 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown; +Cc: linux-kernel, Mattias Wallin

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>
---
 drivers/regulator/core.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index f1d10c9..dc7d36e 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -1424,6 +1424,7 @@ int regulator_disable(struct regulator *regulator)
 	/* decrease our supplies ref count and disable if required */
 	while (supply_rdev != NULL) {
 		rdev = supply_rdev;
+		supply_rdev = NULL;
 
 		mutex_lock(&rdev->mutex);
 		_regulator_disable(rdev, &supply_rdev);
-- 
1.6.3.3


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-11-02 14:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-02 12:22 [PATCH] regulator: regulator disable supply fix Mattias Wallin
2010-11-02 13:19 ` Mark Brown
2010-11-02 13:45   ` Mattias Wallin
2010-11-02 13:46     ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox