aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2014-06-02 19:13:46 -0400
committerLinus Walleij <linus.walleij@linaro.org>2014-06-12 03:57:00 -0400
commit06fc3b70f1dc9c53070fa63a528830f54afc3c38 (patch)
tree6a9596e3859810e85b7690531fefd9234617e5f4
parent963649d735c8b6eb0f97e82c54f02426ff3f1f45 (diff)
gpio: of: Fix handling for deferred probe for -gpio suffix
Commit dd34c37aa3e (gpio: of: Allow -gpio suffix for property names) added parsing for both -gpio and -gpios suffix but also changed the handling for deferred probe unintentionally. Because of the looping the second name will now return -ENOENT instead of -EPROBE_DEFER. Fix the issue by breaking out of the loop if -EPROBE_DEFER is encountered. Signed-off-by: Tony Lindgren <tony@atomide.com> Reviewed-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-rw-r--r--drivers/gpio/gpiolib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index d9c9cb4665db..2ebc9071e354 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -2614,7 +2614,7 @@ static struct gpio_desc *of_find_gpio(struct device *dev, const char *con_id,
2614 2614
2615 desc = of_get_named_gpiod_flags(dev->of_node, prop_name, idx, 2615 desc = of_get_named_gpiod_flags(dev->of_node, prop_name, idx,
2616 &of_flags); 2616 &of_flags);
2617 if (!IS_ERR(desc)) 2617 if (!IS_ERR(desc) || (PTR_ERR(desc) == -EPROBE_DEFER))
2618 break; 2618 break;
2619 } 2619 }
2620 2620