regulator: don't emit errors in {devm_}regulator_bulk_get when defering

A patch from »add power-supply support to dw_hdmi« in state Rework for linux-kernel

From: Heiko Stuebner <heiko@...> Date: Sun, 8 Mar 2015 22:55:06 +0100

Commit-Message

When {devm_}regulator_get returns -EPROBE_DEFER the driver in question will try probing again at a later time. So don't spam the log with failure messages as this is an expected result of probe ordering. Signed-off-by: Heiko Stuebner <heiko@...>

Patch-Comment

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

Statistics

  • 6 lines added
  • 4 lines removed

Changes

--------------------------- drivers/regulator/core.c ---------------------------
index 52af1d7..07ca6cb 100644
@@ -3163,8 +3163,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;
}
-------------------------- drivers/regulator/devres.c --------------------------
index 6ec1d40..78e460d 100644
@@ -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;
}
 
 

Recent Patches

About Us

Sed lacus. Donec lectus. Nullam pretium nibh ut turpis. Nam bibendum. In nulla tortor, elementum vel, tempor at, varius non, purus. Mauris vitae nisl nec metus placerat consectetuer.

Read More...