regulator: core: Always warn when using a dummy regulator

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>
This commit is contained in:
Mark Brown 2013-10-04 11:42:53 +01:00
Родитель ef60abbb6b
Коммит 4040394e12
1 изменённых файлов: 2 добавлений и 7 удалений

Просмотреть файл

@ -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;