aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWolfram Sang <wsa+renesas@sang-engineering.com>2018-01-14 16:07:09 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-01-22 08:17:44 -0500
commitf8bdfe9d27350735d1cc787a5fd7c25078667496 (patch)
treefad38561087a7136a40037513f3985a78d2cca81
parentc14b65feac9ebed649d6fe79c6b6d64d21d0287d (diff)
serial: mxs-auart: don't use GPIOF_* with gpiod_get_direction
The documentation was wrong, gpiod_get_direction() returns 0/1 instead of the GPIOF_* flags. The docs were fixed with commit 94fc73094abe47 ("gpio: correct docs about return value of gpiod_get_direction"). Now, fix this user (until a better, system-wide solution is in place). This also means we can drop the deprecated use of 'linux/gpio.h'. Yay! Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/tty/serial/mxs-auart.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/tty/serial/mxs-auart.c b/drivers/tty/serial/mxs-auart.c
index 5b470406bf9d..079dc47aa142 100644
--- a/drivers/tty/serial/mxs-auart.c
+++ b/drivers/tty/serial/mxs-auart.c
@@ -40,7 +40,6 @@
40 40
41#include <asm/cacheflush.h> 41#include <asm/cacheflush.h>
42 42
43#include <linux/gpio.h>
44#include <linux/gpio/consumer.h> 43#include <linux/gpio/consumer.h>
45#include <linux/err.h> 44#include <linux/err.h>
46#include <linux/irq.h> 45#include <linux/irq.h>
@@ -1597,7 +1596,7 @@ static int mxs_auart_init_gpios(struct mxs_auart_port *s, struct device *dev)
1597 1596
1598 for (i = 0; i < UART_GPIO_MAX; i++) { 1597 for (i = 0; i < UART_GPIO_MAX; i++) {
1599 gpiod = mctrl_gpio_to_gpiod(s->gpios, i); 1598 gpiod = mctrl_gpio_to_gpiod(s->gpios, i);
1600 if (gpiod && (gpiod_get_direction(gpiod) == GPIOF_DIR_IN)) 1599 if (gpiod && (gpiod_get_direction(gpiod) == 1))
1601 s->gpio_irq[i] = gpiod_to_irq(gpiod); 1600 s->gpio_irq[i] = gpiod_to_irq(gpiod);
1602 else 1601 else
1603 s->gpio_irq[i] = -EINVAL; 1602 s->gpio_irq[i] = -EINVAL;