提交 bea4dbee 编写于 作者: S Sachin Kamat 提交者: Linus Walleij

gpio: gpiolib-of: Use PTR_ERR_OR_ZERO

PTR_RET is deprecated. Use PTR_ERR_OR_ZERO instead. While at it
also include missing err.h header.
Signed-off-by: NSachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
上级 bdb93c03
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
*/ */
#include <linux/device.h> #include <linux/device.h>
#include <linux/err.h>
#include <linux/errno.h> #include <linux/errno.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/io.h> #include <linux/io.h>
...@@ -90,7 +91,7 @@ struct gpio_desc *of_get_named_gpiod_flags(struct device_node *np, ...@@ -90,7 +91,7 @@ struct gpio_desc *of_get_named_gpiod_flags(struct device_node *np,
of_node_put(gg_data.gpiospec.np); of_node_put(gg_data.gpiospec.np);
pr_debug("%s exited with status %d\n", __func__, 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; return gg_data.out_gpio;
} }
EXPORT_SYMBOL(of_get_named_gpiod_flags); EXPORT_SYMBOL(of_get_named_gpiod_flags);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册