Skip to content

Commit 06fc3b7

Browse files
tmlindlinusw
authored andcommitted
gpio: of: Fix handling for deferred probe for -gpio suffix
Commit dd34c37 (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>
1 parent 963649d commit 06fc3b7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpio/gpiolib.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2614,7 +2614,7 @@ static struct gpio_desc *of_find_gpio(struct device *dev, const char *con_id,
26142614

26152615
desc = of_get_named_gpiod_flags(dev->of_node, prop_name, idx,
26162616
&of_flags);
2617-
if (!IS_ERR(desc))
2617+
if (!IS_ERR(desc) || (PTR_ERR(desc) == -EPROBE_DEFER))
26182618
break;
26192619
}
26202620

0 commit comments

Comments
 (0)