Skip to content

Commit

Permalink
gpio: gpiolib-of: Use PTR_ERR_OR_ZERO
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sachin Kamat authored and Linus Walleij committed Feb 6, 2014
1 parent bdb93c0 commit bea4dbe
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/gpio/gpiolib-of.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
*/

#include <linux/device.h>
#include <linux/err.h>
#include <linux/errno.h>
#include <linux/module.h>
#include <linux/io.h>
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit bea4dbe

Please sign in to comment.