Skip to contentSkip to conversation

gpio/gpio-ich: make ichx_gpio_check_available() return a pure boolean value

PATCH In review Mika Westerberg 2 participants 2 messages Mar 7, 2013 – Mar 27, 2013

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 drivers/gpio/gpio-ich.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpio/gpio-ich.c +1 -1
index f9dbd50..22ea0be 100644
@@ -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)
Signature · 1 line
1.7.10.4