Skip to content

Commit f8bdfe9

Browse files
Wolfram Sanggregkh
authored andcommitted
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 94fc730 ("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>
1 parent c14b65f commit f8bdfe9

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/tty/serial/mxs-auart.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040

4141
#include <asm/cacheflush.h>
4242

43-
#include <linux/gpio.h>
4443
#include <linux/gpio/consumer.h>
4544
#include <linux/err.h>
4645
#include <linux/irq.h>
@@ -1597,7 +1596,7 @@ static int mxs_auart_init_gpios(struct mxs_auart_port *s, struct device *dev)
15971596

15981597
for (i = 0; i < UART_GPIO_MAX; i++) {
15991598
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))
16011600
s->gpio_irq[i] = gpiod_to_irq(gpiod);
16021601
else
16031602
s->gpio_irq[i] = -EINVAL;

0 commit comments

Comments
 (0)