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 | bb5cd9c240e1bb9d9e5d285e415186434228b959 (patch) | |
tree | c9c50b4d3b1c16d2cd46ca430ba7b35f9815ff8e /target/linux/adm5120/files | |
parent | 9d41b1731d8dc744d7421b587250367aac6d289a (diff) | |
download | mtk-20170518-bb5cd9c240e1bb9d9e5d285e415186434228b959.zip mtk-20170518-bb5cd9c240e1bb9d9e5d285e415186434228b959.tar.gz mtk-20170518-bb5cd9c240e1bb9d9e5d285e415186434228b959.tar.bz2 |
fix a bug in the GPIO code
SVN-Revision: 10759
Diffstat (limited to 'target/linux/adm5120/files')
-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 bf25267..02fd01b 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) |