diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2008-04-07 14:10:37 +0000 |
---|---|---|
committer | Gabor Juhos <juhosg@openwrt.org> | 2008-04-07 14:10:37 +0000 |
commit | b0a644a9945185af6c4a818c5346d3e51bf3f667 (patch) | |
tree | d8187e578f8208220a6d108e027fe5365a25e74d /target/linux/adm5120/files/arch/mips | |
parent | 7302352bcc09dbebede4dc9b80bf24ceb6d45f5f (diff) | |
download | upstream-b0a644a9945185af6c4a818c5346d3e51bf3f667.tar.gz upstream-b0a644a9945185af6c4a818c5346d3e51bf3f667.tar.bz2 upstream-b0a644a9945185af6c4a818c5346d3e51bf3f667.zip |
[adm5120] fix a bug in the GPIO code
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@10759 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/adm5120/files/arch/mips')
-rw-r--r-- | target/linux/adm5120/files/arch/mips/adm5120/gpio.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/target/linux/adm5120/files/arch/mips/adm5120/gpio.c b/target/linux/adm5120/files/arch/mips/adm5120/gpio.c index bf252670d4..02fd01bcbc 100644 --- a/target/linux/adm5120/files/arch/mips/adm5120/gpio.c +++ b/target/linux/adm5120/files/arch/mips/adm5120/gpio.c @@ -70,10 +70,10 @@ static u32 gpio_conf2; static inline int gpio_is_invalid(unsigned gpio) { if ((gpio > ADM5120_GPIO_MAX) || - (adm5120_gpio_map[gpio].flags & GPIO_FLAG_VALID) == 0); - return 0; + (adm5120_gpio_map[gpio].flags & GPIO_FLAG_VALID) == 0) + return 1; - return 1; + return 0; } static inline int gpio_is_used(unsigned gpio) |