lkml.org 
[lkml]   [2010]   [Nov]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] regulator: regulator disable supply fix
    On Tue, Nov 02, 2010 at 01:22:29PM +0100, Mattias Wallin wrote:
    > 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>

    Hrm. This does fix the problem which is needed so:

    Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.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);

    but this does smell a bit like it ought to be in the _regulator_disable()
    call rather than the caller.


    \
     
     \ /
      Last update: 2010-11-02 14:23    [W:0.020 / U:0.204 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site