projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3cbf182
)
gpio/gpio-ich: make ichx_gpio_check_available() return a pure boolean value
author
Mika Westerberg
<mika.westerberg@linux.intel.com>
Thu, 7 Mar 2013 08:48:19 +0000
(10:48 +0200)
committer
Linus Walleij
<linus.walleij@linaro.org>
Wed, 27 Mar 2013 15:05:09 +0000
(16:05 +0100)
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>
drivers/gpio/gpio-ich.c
patch
|
blob
|
history
diff --git
a/drivers/gpio/gpio-ich.c
b/drivers/gpio/gpio-ich.c
index 31682178c59be31da9efc641872bda7b37e184c4..2829d6d500266cd6002b151b690904ddfaea3590 100644
(file)
--- 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)