[PATCH v3 1/4] gpio-imx: Do not use gpio_set_value()

Andrey Smirnov andrew.smirnov at gmail.com
Sat Jun 3 20:11:51 PDT 2017


Do not use gpio_set_value() in imx_gpio_direction_output().  We don't
check gpio_set_value's result, so calling imx_gpio_set_value()
directly instead should be as good.

Cc: cphealy at gmail.com
Cc: Nikita Yushchenko <nikita.yoush at cogentembedded.com>
Acked-by: Nikita Yushchenko <nikita.yoush at cogentembedded.com>
Signed-off-by: Andrey Smirnov <andrew.smirnov at gmail.com>
---
 drivers/gpio/gpio-imx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpio/gpio-imx.c b/drivers/gpio/gpio-imx.c
index ab4f596..a9d44d4 100644
--- a/drivers/gpio/gpio-imx.c
+++ b/drivers/gpio/gpio-imx.c
@@ -93,7 +93,7 @@ static int imx_gpio_direction_output(struct gpio_chip *chip, unsigned gpio, int
 	void __iomem *base = imxgpio->base;
 	u32 val;
 
-	gpio_set_value(gpio + chip->base, value);
+	imx_gpio_set_value(chip, gpio, value);
 
 	val = readl(base + imxgpio->regs->gdir);
 	val |= 1 << gpio;
-- 
2.9.4




More information about the barebox mailing list