summaryrefslogtreecommitdiffstats
path: root/drivers/regulator
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2011-02-24 17:39:09 +0000
committerLiam Girdwood <lrg@slimlogic.co.uk>2011-03-26 14:15:03 +0000
commit23c2f041efa891e6ec0706dc9ad4f776a9aa8c14 (patch)
treeee6174b3a243c55bc4e00b7f6d49ac788abfec2d /drivers/regulator
parent16c29dafcc86024048f1dbb8349d31cb22c7c55a (diff)
downloadop-kernel-dev-23c2f041efa891e6ec0706dc9ad4f776a9aa8c14.zip
op-kernel-dev-23c2f041efa891e6ec0706dc9ad4f776a9aa8c14.tar.gz
regulator: If we fail when setting up a supply say which supply
Makes it a bit easier to identify if it's a problem with the supplies, the usual error would be omitting the supply name entirely. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Diffstat (limited to 'drivers/regulator')
-rw-r--r--drivers/regulator/core.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 9fa2095..a2dc622 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -2565,8 +2565,11 @@ struct regulator_dev *regulator_register(struct regulator_desc *regulator_desc,
init_data->consumer_supplies[i].dev,
init_data->consumer_supplies[i].dev_name,
init_data->consumer_supplies[i].supply);
- if (ret < 0)
+ if (ret < 0) {
+ dev_err(dev, "Failed to set supply %s\n",
+ init_data->consumer_supplies[i].supply);
goto unset_supplies;
+ }
}
list_add(&rdev->list, &regulator_list);
OpenPOWER on IntegriCloud