diff options
author | Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com> | 2015-04-15 00:53:17 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2015-04-17 07:23:47 +0200 |
commit | c6a9698dc1e54d8be388573167786da1e3ed85a8 (patch) | |
tree | c6d4eef9f9b79f102e9e50254fde12a0a4157ae7 /drivers/of | |
parent | 9744da2e2b073102bf84438f073352339c1047ce (diff) | |
download | barebox-c6a9698dc1e54d8be388573167786da1e3ed85a8.tar.gz barebox-c6a9698dc1e54d8be388573167786da1e3ed85a8.tar.xz |
OF: gpio: Silence error message on -EPROBE_DEFER
With deferred probing, -EPROBE_DEFER is not worth spilling an error.
Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/of')
-rw-r--r-- | drivers/of/of_gpio.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/of/of_gpio.c b/drivers/of/of_gpio.c index 6738a220a5..dc8ae22776 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); |