summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/sysdev/simple_gpio.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/sysdev/simple_gpio.c')
-rw-r--r--arch/powerpc/sysdev/simple_gpio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/sysdev/simple_gpio.c b/arch/powerpc/sysdev/simple_gpio.c
index ff5e732..56ce8ca 100644
--- a/arch/powerpc/sysdev/simple_gpio.c
+++ b/arch/powerpc/sysdev/simple_gpio.c
@@ -46,7 +46,7 @@ static int u8_gpio_get(struct gpio_chip *gc, unsigned int gpio)
{
struct of_mm_gpio_chip *mm_gc = to_of_mm_gpio_chip(gc);
- return in_8(mm_gc->regs) & u8_pin2mask(gpio);
+ return !!(in_8(mm_gc->regs) & u8_pin2mask(gpio));
}
static void u8_gpio_set(struct gpio_chip *gc, unsigned int gpio, int val)
OpenPOWER on IntegriCloud