diff options
author | Sachin Kamat <sachin.kamat@linaro.org> | 2014-01-27 01:45:08 -0500 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2014-02-06 04:33:46 -0500 |
commit | bea4dbee952ac7a03885646de3247685dabad972 (patch) | |
tree | d5d3a956351450a956d27cdce398909fed059c6e /drivers/gpio | |
parent | bdb93c03c5503aba9a6d98d49e543d879d85d0c4 (diff) |
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: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio')
-rw-r--r-- | drivers/gpio/gpiolib-of.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c index e0a98f581f58..2024d45e5503 100644 --- a/drivers/gpio/gpiolib-of.c +++ b/drivers/gpio/gpiolib-of.c | |||
@@ -12,6 +12,7 @@ | |||
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/device.h> | 14 | #include <linux/device.h> |
15 | #include <linux/err.h> | ||
15 | #include <linux/errno.h> | 16 | #include <linux/errno.h> |
16 | #include <linux/module.h> | 17 | #include <linux/module.h> |
17 | #include <linux/io.h> | 18 | #include <linux/io.h> |
@@ -90,7 +91,7 @@ struct gpio_desc *of_get_named_gpiod_flags(struct device_node *np, | |||
90 | 91 | ||
91 | of_node_put(gg_data.gpiospec.np); | 92 | of_node_put(gg_data.gpiospec.np); |
92 | pr_debug("%s exited with status %d\n", __func__, | 93 | pr_debug("%s exited with status %d\n", __func__, |
93 | PTR_RET(gg_data.out_gpio)); | 94 | PTR_ERR_OR_ZERO(gg_data.out_gpio)); |
94 | return gg_data.out_gpio; | 95 | return gg_data.out_gpio; |
95 | } | 96 | } |
96 | EXPORT_SYMBOL(of_get_named_gpiod_flags); | 97 | EXPORT_SYMBOL(of_get_named_gpiod_flags); |