regulator: If we fail when setting up a supply say which supply
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Thu, 24 Feb 2011 17:39:09 +0000 (17:39 +0000)
committerLiam Girdwood <lrg@slimlogic.co.uk>
Sat, 26 Mar 2011 14:15:03 +0000 (14:15 +0000)
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>
drivers/regulator/core.c

index 9fa20957847dbe3e0f44cac292a49e0a35133de3..a2dc6223e8d2c51ccffbe2e0d9d96b9c3fc910a7 100644 (file)
@@ -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);