]> git.baikalelectronics.ru Git - kernel.git/commitdiff
pinctrl: nomadik: fix inversion of gpio direction
authorLinus Walleij <linus.walleij@linaro.org>
Tue, 24 May 2016 12:39:47 +0000 (14:39 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Mon, 30 May 2016 07:42:37 +0000 (09:42 +0200)
The input/output directions were inversed on the GPIO direction
read function. Loose a ! and it is correct.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/nomadik/pinctrl-nomadik.c

index ccbfc325c7789e05ff2072fb021d73118990f1c1..38faceff2f084202e035e1a0c122073eb5f456c9 100644 (file)
@@ -854,7 +854,7 @@ static int nmk_gpio_get_dir(struct gpio_chip *chip, unsigned offset)
 
        clk_enable(nmk_chip->clk);
 
-       dir = !!(readl(nmk_chip->addr + NMK_GPIO_DIR) & BIT(offset));
+       dir = !(readl(nmk_chip->addr + NMK_GPIO_DIR) & BIT(offset));
 
        clk_disable(nmk_chip->clk);