From: Mika Westerberg Date: Thu, 7 Mar 2013 08:48:19 +0000 (+0200) Subject: gpio/gpio-ich: make ichx_gpio_check_available() return a pure boolean value X-Git-Tag: firefly_0821_release~3680^2~560^2~37 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=61d793bbfb76ea6740dd1c1a4f2cdac57a0c1c5c;p=firefly-linux-kernel-4.4.55.git 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 Signed-off-by: Linus Walleij --- 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)