aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel/gpio_txx9.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/kernel/gpio_txx9.c')
-rw-r--r--arch/mips/kernel/gpio_txx9.c2
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;
static int txx9_gpio_get(struct gpio_chip *chip, unsigned int offset)
{
- return __raw_readl(&txx9_pioptr->din) & (1 << offset);
+ return !!(__raw_readl(&txx9_pioptr->din) & (1 << offset));
}
static void txx9_gpio_set_raw(unsigned int offset, int value)