public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] regulator: If we fail when setting up a supply say which supply
@ 2011-02-24 17:39 Mark Brown
  2011-02-25  9:00 ` Liam Girdwood
  0 siblings, 1 reply; 2+ messages in thread
From: Mark Brown @ 2011-02-24 17:39 UTC (permalink / raw)
  To: Liam Girdwood; +Cc: patches, linux-kernel, Mark Brown

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>
---
 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, &regulator_list);
-- 
1.7.2.3


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] regulator: If we fail when setting up a supply say which supply
  2011-02-24 17:39 [PATCH] regulator: If we fail when setting up a supply say which supply Mark Brown
@ 2011-02-25  9:00 ` Liam Girdwood
  0 siblings, 0 replies; 2+ messages in thread
From: Liam Girdwood @ 2011-02-25  9:00 UTC (permalink / raw)
  To: Mark Brown; +Cc: patches, linux-kernel

On Thu, 2011-02-24 at 17:39 +0000, Mark Brown wrote:
> 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>
> ---
>  drivers/regulator/core.c |    5 ++++-
>  1 files changed, 4 insertions(+), 1 deletions(-)

Applied.

Thanks

Liam


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-02-25  9:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-24 17:39 [PATCH] regulator: If we fail when setting up a supply say which supply Mark Brown
2011-02-25  9:00 ` Liam Girdwood

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox