Skip to contentSkip to conversation

sh: Update gpio_set_value() pin value handling

PATCH New Magnus Damm 1 participant 1 message Oct 21, 2008 SuperH

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sh: Update gpio_set_value() pin value handling

From: Magnus Damm <[email protected]>

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.

---

 arch/sh/kernel/gpio.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/sh/kernel/gpio.c +1 -1
@@ -432,7 +432,7 @@ static int __gpio_get_set_value(struct p
 		BUG();
 	else
 		value = read_write_reg(dr->reg, dr->reg_width,
-				       1, bit, value, do_write);
+				       1, bit, !!value, do_write);
 
 	return value;
 }