diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-09-29 08:31:52 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-09-29 08:31:52 -0700 |
commit | 0f873d5fb68a6aea9519c9cd613ddf4e7e2378d4 (patch) | |
tree | 92f98ce0951cb5eec91490fb1ad9e5b0ffe7ca63 /arch/mips/au1000/common/gpio.c | |
parent | df45eddc60e1ab4c81b61e240271eabb4fb176e8 (diff) | |
parent | ac82da3381fc663dbda31612a0bff60bc41676a3 (diff) |
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus
* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
[SSB] Initialise dma_mask for SSB_BUSTYPE_SSB devices
[MIPS] BCM47xx: Fix build error due to missing PCI functions
[MIPS] IP27: Switch to dynamic interrupt routing avoding panic on error.
[MIPS] au1000: Make sure GPIO value is zero or one
Diffstat (limited to 'arch/mips/au1000/common/gpio.c')
-rw-r--r-- | arch/mips/au1000/common/gpio.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/mips/au1000/common/gpio.c b/arch/mips/au1000/common/gpio.c index 1f058434b72..e660ddd611c 100644 --- a/arch/mips/au1000/common/gpio.c +++ b/arch/mips/au1000/common/gpio.c @@ -48,7 +48,7 @@ static void au1xxx_gpio2_write(unsigned gpio, int value) { gpio -= AU1XXX_GPIO_BASE; - gpio2->output = (GPIO2_OUTPUT_ENABLE_MASK << gpio) | (value << gpio); + gpio2->output = (GPIO2_OUTPUT_ENABLE_MASK << gpio) | ((!!value) << gpio); } static int au1xxx_gpio2_direction_input(unsigned gpio) @@ -62,7 +62,7 @@ static int au1xxx_gpio2_direction_output(unsigned gpio, int value) { gpio -= AU1XXX_GPIO_BASE; gpio2->dir |= 0x01 << gpio; - gpio2->output = (GPIO2_OUTPUT_ENABLE_MASK << gpio) | (value << gpio); + gpio2->output = (GPIO2_OUTPUT_ENABLE_MASK << gpio) | ((!!value) << gpio); return 0; } |