From 57ad526ae2c28d128fe0d9deeb428697151c849b Mon Sep 17 00:00:00 2001 From: Laxman Dewangan Date: Mon, 23 Jul 2012 20:35:46 +0530 Subject: [PATCH] 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 Signed-off-by: Mark Brown --- drivers/regulator/core.c | 1 + 1 file changed, 1 insertion(+) 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; } -- 2.39.2