From: Laxman Dewangan Date: Fri, 11 Mar 2016 13:43:20 +0000 (+0530) Subject: gpio: of: Scan available child node for gpio-hog X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d1279d94b4e47c3684f936ed6b6c89d3dd2cd5b9;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 --- 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;