mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-07 15:15:29 +00:00
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>
This commit is contained in:
parent
3cbf1822b5
commit
61d793bbfb
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
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)
|
static int ichx_gpio_direction_input(struct gpio_chip *gpio, unsigned nr)
|
||||||
|
|
Loading…
Add table
Reference in a new issue