summaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-ich.c
diff options
context:
space:
mode:
authorMika Westerberg <mika.westerberg@linux.intel.com>2013-03-07 10:48:19 +0200
committerLinus Walleij <linus.walleij@linaro.org>2013-03-27 16:05:09 +0100
commit61d793bbfb76ea6740dd1c1a4f2cdac57a0c1c5c (patch)
tree7af1e5809c104b11a3250a7e5aef0e37eae63604 /drivers/gpio/gpio-ich.c
parent3cbf1822b5fd98eccb641c94c8cd2455fdad9221 (diff)
downloadblackbird-op-linux-61d793bbfb76ea6740dd1c1a4f2cdac57a0c1c5c.tar.gz
blackbird-op-linux-61d793bbfb76ea6740dd1c1a4f2cdac57a0c1c5c.zip
gpio/gpio-ich: make ichx_gpio_check_available() return a pure boolean value
It is more readable for humans to use double-bang (!!) to convert the value to pure boolean before it is returned. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio/gpio-ich.c')
-rw-r--r--drivers/gpio/gpio-ich.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpio/gpio-ich.c b/drivers/gpio/gpio-ich.c
index 31682178c59b..2829d6d50026 100644
--- a/drivers/gpio/gpio-ich.c
+++ b/drivers/gpio/gpio-ich.c
@@ -130,7 +130,7 @@ static int ichx_read_bit(int reg, unsigned nr)
static bool ichx_gpio_check_available(struct gpio_chip *gpio, unsigned nr)
{
- return ichx_priv.use_gpio & (1 << (nr / 32));
+ return !!(ichx_priv.use_gpio & (1 << (nr / 32)));
}
static int ichx_gpio_direction_input(struct gpio_chip *gpio, unsigned nr)
OpenPOWER on IntegriCloud