gpio: of: Scan available child node for gpio-hog
authorLaxman Dewangan <ldewangan@nvidia.com>
Fri, 11 Mar 2016 13:43:20 +0000 (19:13 +0530)
committerLinus Walleij <linus.walleij@linaro.org>
Thu, 14 Apr 2016 12:49:36 +0000 (14:49 +0200)
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 <ldewangan@nvidia.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpiolib-of.c

index a2485093d10d2c2c2d502af8ffed6f0c508ad15e..d81dbd8e90d950e782d0957ae1539173d95c3bee 100644 (file)
@@ -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;