Skip to content

Commit

Permalink
sh: Update gpio_set_value() pin value handling
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Magnus Damm authored and Paul Mundt committed Oct 21, 2008
1 parent 3b49551 commit ed0b2ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/sh/kernel/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit ed0b2ef

Please sign in to comment.