public inbox for linux-sh@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sh: Update gpio_set_value() pin value handling
@ 2008-10-21 12:31 Magnus Damm
  0 siblings, 0 replies; only message in thread
From: Magnus Damm @ 2008-10-21 12:31 UTC (permalink / raw)
  To: linux-sh

From: Magnus Damm <damm@igel.co.jp>

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>
---

 arch/sh/kernel/gpio.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- 0001/arch/sh/kernel/gpio.c
+++ work/arch/sh/kernel/gpio.c	2008-10-21 20:22:25.000000000 +0900
@@ -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;
 }

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-10-21 12:31 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-21 12:31 [PATCH] sh: Update gpio_set_value() pin value handling Magnus Damm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox