[PATCH v2 3/6] OF: gpio: Silence error message on -EPROBE_DEFER
Sebastian Hesselbarth
sebastian.hesselbarth at gmail.com
Tue Apr 14 15:53:17 PDT 2015
With deferred probing, -EPROBE_DEFER is not worth spilling an error.
Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth at gmail.com>
---
Changelog:
v1->v2:
- Also return early on gpio_get_num() == -EPROBE_DEFER
Cc: barebox at lists.infradead.org
---
drivers/of/of_gpio.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/of/of_gpio.c b/drivers/of/of_gpio.c
index 6738a220a5a3..dc8ae2277641 100644
--- a/drivers/of/of_gpio.c
+++ b/drivers/of/of_gpio.c
@@ -32,12 +32,14 @@ int of_get_named_gpio_flags(struct device_node *np, const char *propname,
dev = of_find_device_by_node(out_args.np);
if (!dev) {
- pr_err("%s: unable to find device of node %s\n",
- __func__, out_args.np->full_name);
- return -ENODEV;
+ pr_debug("%s: unable to find device of node %s\n",
+ __func__, out_args.np->full_name);
+ return -EPROBE_DEFER;
}
ret = gpio_get_num(dev, out_args.args[0]);
+ if (ret == -EPROBE_DEFER)
+ return ret;
if (ret < 0) {
pr_err("%s: unable to get gpio num of device %s: %d\n",
__func__, dev_name(dev), ret);
--
2.1.0
More information about the barebox
mailing list