Re: [patch 2.6.28-rc5] regulator: enable/disable refcounting

From: Liam Girdwood
Date: Mon Nov 17 2008 - 11:46:43 EST


On Mon, 2008-11-17 at 08:21 -0800, David Brownell wrote:
> On Monday 17 November 2008, Mark Brown wrote:
> > On Sun, Nov 16, 2008 at 11:44:46AM -0800, David Brownell wrote:
> >
> > > + mutex_lock(&rdev->mutex);
> > > + if (regulator->enabled == 1) {
> > > + ret = _regulator_disable(rdev);
> > > + if (ret == 0)
> > > + regulator->uA_load = 0;
> >
> > Why clear the load here? I'd expect to be able to enable and disable
> > the regulator while preserving the configuration.
>
> That clear was in the original code. Didn't make much sense
> to me either, but I was just caring it forward...
>

Hmm, this looks like a bug - I'll fix in a subsequent patch.

Will have time to look over the rest later tonight.

Thanks

Liam

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/