lkml.org 
[lkml]   [2010]   [Nov]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] regulator: enable supply regulator only when use count is zero
On Wed, Nov 10, 2010 at 11:06:22AM +0100, Bengt Jonsson wrote:
> Supply regulators are disabled only when the last
> reference count is removed on the child regulator
> (the use count goes from 1 to 0). This patch changes
> the behaviour of enable so the supply regulator is
> enabled only when the use count of the child
> regulator goes from 0 to 1.

Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>

> + if (rdev->use_count == 0) {
> + /* do we need to enable the supply regulator first */
> + if (rdev->supply) {

This'd be a bit neater (and less invasive) as a single if statement with
&&.


\
 
 \ /
  Last update: 2010-11-10 17:41    [W:0.060 / U:0.048 seconds]
©2003-2014 Jasper Spaans. Advertise on this site