From: Laxman Dewangan Date: Mon, 23 Jul 2012 15:05:46 +0000 (+0530) Subject: regulator: core: increment open_count when regulator supply is set X-Git-Tag: firefly_0821_release~3680^2~2008^2^2~9 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=57ad526ae2c28d128fe0d9deeb428697151c849b;p=firefly-linux-kernel-4.4.55.git 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 --- 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; }