drm/nouveau: require reservations for nouveau_fence_sync and nouveau_bo_fence
[deliverable/linux.git] / drivers / gpio / gpiolib-of.c
index af7e25c9a9ae6d56d5765870f233830c7b4a9e5a..604dbe60bdee1abdddb8d706947391987628ab9e 100644 (file)
@@ -23,7 +23,7 @@
 #include <linux/pinctrl/pinctrl.h>
 #include <linux/slab.h>
 
-struct gpio_desc;
+#include "gpiolib.h"
 
 /* Private data structure for of_gpiochip_find_and_xlate */
 struct gg_data {
@@ -82,19 +82,19 @@ struct gpio_desc *of_get_named_gpiod_flags(struct device_node *np,
        ret = of_parse_phandle_with_args(np, propname, "#gpio-cells", index,
                                         &gg_data.gpiospec);
        if (ret) {
-               pr_debug("%s: can't parse gpios property of node '%s[%d]'\n",
-                       __func__, np->full_name, index);
+               pr_debug("%s: can't parse '%s' property of node '%s[%d]'\n",
+                       __func__, propname, np->full_name, index);
                return ERR_PTR(ret);
        }
 
        gpiochip_find(&gg_data, of_gpiochip_find_and_xlate);
 
        of_node_put(gg_data.gpiospec.np);
-       pr_debug("%s exited with status %d\n", __func__,
+       pr_debug("%s: parsed '%s' property of node '%s[%d]' - status (%d)\n",
+                __func__, propname, np->full_name, index,
                 PTR_ERR_OR_ZERO(gg_data.out_gpio));
        return gg_data.out_gpio;
 }
-EXPORT_SYMBOL(of_get_named_gpiod_flags);
 
 int of_get_named_gpio_flags(struct device_node *np, const char *list_name,
                            int index, enum of_gpio_flags *flags)
@@ -307,7 +307,5 @@ void of_gpiochip_add(struct gpio_chip *chip)
 void of_gpiochip_remove(struct gpio_chip *chip)
 {
        gpiochip_remove_pin_ranges(chip);
-
-       if (chip->of_node)
-               of_node_put(chip->of_node);
+       of_node_put(chip->of_node);
 }
This page took 0.026408 seconds and 5 git commands to generate.