From: Wolfram Sang Date: Sun, 14 Jan 2018 21:07:09 +0000 (+0100) Subject: serial: mxs-auart: don't use GPIOF_* with gpiod_get_direction X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=f8bdfe9d27350735d1cc787a5fd7c25078667496;p=linux.git 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/tty/serial/mxs-auart.c b/drivers/tty/serial/mxs-auart.c index 5b470406bf9d6..079dc47aa142d 100644 --- a/drivers/tty/serial/mxs-auart.c +++ b/drivers/tty/serial/mxs-auart.c @@ -40,7 +40,6 @@ #include -#include #include #include #include @@ -1597,7 +1596,7 @@ static int mxs_auart_init_gpios(struct mxs_auart_port *s, struct device *dev) for (i = 0; i < UART_GPIO_MAX; i++) { gpiod = mctrl_gpio_to_gpiod(s->gpios, i); - if (gpiod && (gpiod_get_direction(gpiod) == GPIOF_DIR_IN)) + if (gpiod && (gpiod_get_direction(gpiod) == 1)) s->gpio_irq[i] = gpiod_to_irq(gpiod); else s->gpio_irq[i] = -EINVAL;