Merge tag 'gpio-v4.5-1' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux...
[linux-2.6-block.git] / drivers / mfd / ucb1x00-core.c
index a6ec7cc0fac6667ed026bff03dcb2e399f56847f..bcafe1ecd71cd4c4fc9492a2cd9db64068f28ff3 100644 (file)
@@ -133,7 +133,7 @@ static int ucb1x00_gpio_get(struct gpio_chip *chip, unsigned offset)
        val = ucb1x00_reg_read(ucb, UCB_IO_DATA);
        ucb1x00_disable(ucb);
 
-       return val & (1 << offset);
+       return !!(val & (1 << offset));
 }
 
 static int ucb1x00_gpio_direction_input(struct gpio_chip *chip, unsigned offset)