mirror of
https://github.com/openwrt/openwrt.git
synced 2025-02-04 10:10:47 +00:00
ramips: sanitize return value of ramips_gpio_get
SVN-Revision: 19401
This commit is contained in:
parent
af9f40e60d
commit
e2dde81ead
@ -131,7 +131,7 @@ static int ramips_gpio_get(struct gpio_chip *chip, unsigned offset)
|
|||||||
u32 t;
|
u32 t;
|
||||||
|
|
||||||
t = ramips_gpio_rr(rg, RAMIPS_GPIO_REG_DATA);
|
t = ramips_gpio_rr(rg, RAMIPS_GPIO_REG_DATA);
|
||||||
return (t & (1 << offset));
|
return !!(t & (1 << offset));
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct ramips_gpio_chip ramips_gpio_chip0 = {
|
static struct ramips_gpio_chip ramips_gpio_chip0 = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user