diff options
-rw-r--r-- | arch/mips/kernel/gpio_txx9.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/mips/kernel/gpio_txx9.c b/arch/mips/kernel/gpio_txx9.c index c6854d9df926..705be43c3533 100644 --- a/arch/mips/kernel/gpio_txx9.c +++ b/arch/mips/kernel/gpio_txx9.c | |||
@@ -21,7 +21,7 @@ static struct txx9_pio_reg __iomem *txx9_pioptr; | |||
21 | 21 | ||
22 | static int txx9_gpio_get(struct gpio_chip *chip, unsigned int offset) | 22 | static int txx9_gpio_get(struct gpio_chip *chip, unsigned int offset) |
23 | { | 23 | { |
24 | return __raw_readl(&txx9_pioptr->din) & (1 << offset); | 24 | return !!(__raw_readl(&txx9_pioptr->din) & (1 << offset)); |
25 | } | 25 | } |
26 | 26 | ||
27 | static void txx9_gpio_set_raw(unsigned int offset, int value) | 27 | static void txx9_gpio_set_raw(unsigned int offset, int value) |