]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
gpio: gpiolib-of: Use PTR_ERR_OR_ZERO
authorSachin Kamat <sachin.kamat@linaro.org>
Mon, 27 Jan 2014 06:45:08 +0000 (12:15 +0530)
committerLinus Walleij <linus.walleij@linaro.org>
Thu, 6 Feb 2014 09:33:46 +0000 (10:33 +0100)
PTR_RET is deprecated. Use PTR_ERR_OR_ZERO instead. While at it
also include missing err.h header.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpiolib-of.c

index e0a98f581f58d5fd7266a4d805286d7df14e4452..2024d45e5503624ba7c1b9ff7d75f91fb4e912e1 100644 (file)
@@ -12,6 +12,7 @@
  */
 
 #include <linux/device.h>
+#include <linux/err.h>
 #include <linux/errno.h>
 #include <linux/module.h>
 #include <linux/io.h>
@@ -90,7 +91,7 @@ struct gpio_desc *of_get_named_gpiod_flags(struct device_node *np,
 
        of_node_put(gg_data.gpiospec.np);
        pr_debug("%s exited with status %d\n", __func__,
-                PTR_RET(gg_data.out_gpio));
+                PTR_ERR_OR_ZERO(gg_data.out_gpio));
        return gg_data.out_gpio;
 }
 EXPORT_SYMBOL(of_get_named_gpiod_flags);