diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-02-24 17:39:09 +0000 |
---|---|---|
committer | Liam Girdwood <lrg@slimlogic.co.uk> | 2011-03-26 14:15:03 +0000 |
commit | 23c2f041efa891e6ec0706dc9ad4f776a9aa8c14 (patch) | |
tree | ee6174b3a243c55bc4e00b7f6d49ac788abfec2d | |
parent | 16c29dafcc86024048f1dbb8349d31cb22c7c55a (diff) | |
download | op-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>
-rw-r--r-- | drivers/regulator/core.c | 5 |
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, ®ulator_list); |