Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753422AbeANVHo (ORCPT + 1 other); Sun, 14 Jan 2018 16:07:44 -0500 Received: from sauhun.de ([88.99.104.3]:36564 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752461AbeANVHk (ORCPT ); Sun, 14 Jan 2018 16:07:40 -0500 From: Wolfram Sang To: linux-gpio@vger.kernel.org Cc: linux-renesas-soc@vger.kernel.org, Wolfram Sang , Greg Kroah-Hartman , Jiri Slaby , linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/3] serial: mxs-auart: don't use GPIOF_* with gpiod_get_direction Date: Sun, 14 Jan 2018 22:07:09 +0100 Message-Id: <20180114210711.13863-3-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180114210711.13863-1-wsa+renesas@sang-engineering.com> References: <20180114210711.13863-1-wsa+renesas@sang-engineering.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: 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 --- Only build tested! drivers/tty/serial/mxs-auart.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/tty/serial/mxs-auart.c b/drivers/tty/serial/mxs-auart.c index 5b470406bf9d67..079dc47aa142d8 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; -- 2.11.0