aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaxman Dewangan <[email protected]>2012-07-23 20:35:46 +0530
committerMark Brown <[email protected]>2012-08-04 11:58:39 +0100
commit57ad526ae2c28d128fe0d9deeb428697151c849b (patch)
tree4c75fd52d8c957657c34590a564000c1c04b6728
parent4f842f6ba644a8e2360441aa73580373dbc3eb95 (diff)
regulator: core: increment open_count when regulator supply is set
When registering the regulator and setting supply for the regulator then increment open_count to reflect correct number of users. Signed-off-by: Laxman Dewangan <[email protected]> Signed-off-by: Mark Brown <[email protected]>
-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 f092588a078c..b28221af648e 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -974,6 +974,7 @@ static int set_supply(struct regulator_dev *rdev,
err = -ENOMEM;
return err;
}
+ supply_rdev->open_count++;
return 0;
}