From d1279d94b4e47c3684f936ed6b6c89d3dd2cd5b9 Mon Sep 17 00:00:00 2001 From: Laxman Dewangan Date: Fri, 11 Mar 2016 19:13:20 +0530 Subject: [PATCH] gpio: of: Scan available child node for gpio-hog Look for child node which are available when iterating for gpio hog node for request/set GPIO initial configuration during OF gpio chip registration. All it really does is make it possible to set status = "disabled"; in the hog nodes, and then they will not be applied. Signed-off-by: Laxman Dewangan Reviewed-by: Thierry Reding Signed-off-by: Linus Walleij --- drivers/gpio/gpiolib-of.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c index a2485093d10d..d81dbd8e90d9 100644 --- a/drivers/gpio/gpiolib-of.c +++ b/drivers/gpio/gpiolib-of.c @@ -212,7 +212,7 @@ static int of_gpiochip_scan_gpios(struct gpio_chip *chip) enum gpiod_flags dflags; int ret; - for_each_child_of_node(chip->of_node, np) { + for_each_available_child_of_node(chip->of_node, np) { if (!of_property_read_bool(np, "gpio-hog")) continue; -- 2.20.1