1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-12-26 01:18:58 +02:00

ramips: sanitize return value of ramips_gpio_get

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@19401 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
juhosg 2010-01-30 15:25:08 +00:00
parent 1bd851b509
commit 4b55dec3ed

View File

@ -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 = {