Skip to content

Commit

Permalink
regulator: core: increment open_count when regulator supply is set
Browse files Browse the repository at this point in the history
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 <ldewangan@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
Laxman Dewangan authored and Mark Brown committed Aug 4, 2012
1 parent 4f842f6 commit 57ad526
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/regulator/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -974,6 +974,7 @@ static int set_supply(struct regulator_dev *rdev,
err = -ENOMEM;
return err;
}
supply_rdev->open_count++;

return 0;
}
Expand Down

0 comments on commit 57ad526

Please sign in to comment.