mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] regulator: core: Silence EPROBE_DEFER error on bulk_get
@ 2015-02-26 23:40 Bjorn Andersson
  2015-03-05  0:06 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Bjorn Andersson @ 2015-02-26 23:40 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown; +Cc: linux-kernel

As this is already being logged elsewhere we shouldn't spam the log
unnecessarily upon EPROBE_DEFER.

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
---

Maybe we should have a dev_dbg() for EPROBE_DEFER to aid finding which
regulator it actually was that it deferred?

 drivers/regulator/core.c   | 5 +++--
 drivers/regulator/devres.c | 5 +++--
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index 5467744..4429788 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -3148,8 +3148,9 @@ int regulator_bulk_get(struct device *dev, int num_consumers,
 						      consumers[i].supply);
 		if (IS_ERR(consumers[i].consumer)) {
 			ret = PTR_ERR(consumers[i].consumer);
-			dev_err(dev, "Failed to get supply '%s': %d\n",
-				consumers[i].supply, ret);
+			if (ret != -EPROBE_DEFER)
+				dev_err(dev, "Failed to get supply '%s': %d\n",
+					consumers[i].supply, ret);
 			consumers[i].consumer = NULL;
 			goto err;
 		}
diff --git a/drivers/regulator/devres.c b/drivers/regulator/devres.c
index 8f785bc..7cb9e01 100644
--- a/drivers/regulator/devres.c
+++ b/drivers/regulator/devres.c
@@ -168,8 +168,9 @@ int devm_regulator_bulk_get(struct device *dev, int num_consumers,
 							   consumers[i].supply);
 		if (IS_ERR(consumers[i].consumer)) {
 			ret = PTR_ERR(consumers[i].consumer);
-			dev_err(dev, "Failed to get supply '%s': %d\n",
-				consumers[i].supply, ret);
+			if (ret != -EPROBE_DEFER)
+				dev_err(dev, "Failed to get supply '%s': %d\n",
+					consumers[i].supply, ret);
 			consumers[i].consumer = NULL;
 			goto err;
 		}
-- 
1.8.2.2


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

end of thread, other threads:[~2015-03-05  0:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-26 23:40 [PATCH] regulator: core: Silence EPROBE_DEFER error on bulk_get Bjorn Andersson
2015-03-05  0:06 ` Mark Brown

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

all inboxes | Powered by JetHome®