Skip to content

Commit

Permalink
regulator: core: Always warn when using a dummy regulator
Browse files Browse the repository at this point in the history
This helps people spot if they have missed a supply from a device tree or
equivalent data structure.

Suggested-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
  • Loading branch information
Mark Brown committed Oct 4, 2013
1 parent ef60abb commit 4040394
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions drivers/regulator/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1281,13 +1281,8 @@ static struct regulator *_regulator_get(struct device *dev, const char *id,
* even if it isn't hooked up and just provide a dummy.
*/
if (has_full_constraints && allow_dummy) {
/*
* Log the substitution if regulator configuration is
* not complete to help development.
*/
if (!has_full_constraints)
pr_warn("%s supply %s not found, using dummy regulator\n",
devname, id);
pr_warn("%s supply %s not found, using dummy regulator\n",
devname, id);

rdev = dummy_regulator_rdev;
goto found;
Expand Down

0 comments on commit 4040394

Please sign in to comment.