提交 61d793bb 编写于 作者: M Mika Westerberg 提交者: Linus Walleij

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: NMika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
上级 3cbf1822
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册