]> git.karo-electronics.de Git - linux-beck.git/commitdiff
sh: Update gpio_set_value() pin value handling
authorMagnus Damm <damm@igel.co.jp>
Tue, 21 Oct 2008 12:31:07 +0000 (21:31 +0900)
committerPaul Mundt <lethal@linux-sh.org>
Tue, 21 Oct 2008 12:41:23 +0000 (21:41 +0900)
This patch updates the pinmux code to use the boolean value for
the function gpio_set_value(). Without this patch values other
than 0 and 1 will result in incorrect GPIO settings.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
arch/sh/kernel/gpio.c

index bb8b812c6895c1f1d46299a9f4bb09d608ec3cdc..9ac0b8e6c217111edb387eaead63306a606087fa 100644 (file)
@@ -432,7 +432,7 @@ static int __gpio_get_set_value(struct pinmux_info *gpioc,
                BUG();
        else
                value = read_write_reg(dr->reg, dr->reg_width,
-                                      1, bit, value, do_write);
+                                      1, bit, !!value, do_write);
 
        return value;
 }