Skip to contentSkip to conversation

i2c: change return type to bool for i2c_check_functionality

PATCH Superseded Thorsten Blum 1 participant 1 message Mar 29

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

PATCH 1/1 i2c: change return type to bool for i2c_check_functionality

i2c_check_functionality() returns a bool - change the return type from int to bool and update the comment accordingly.

---
 include/linux/i2c.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
include/linux/i2c.h +2 -2
index 20fd41b51d5c..6737bcbc5d7a 100644
@@ -919,8 +919,8 @@ static inline u32 i2c_get_functionality(struct i2c_adapter *adap)
 	return adap->algo->functionality(adap);
 }
 
-/* Return 1 if adapter supports everything we need, 0 if not. */
-static inline int i2c_check_functionality(struct i2c_adapter *adap, u32 func)
+/* Return true if adapter supports everything we need, false if not. */
+static inline bool i2c_check_functionality(struct i2c_adapter *adap, u32 func)
 {
 	return (func & i2c_get_functionality(adap)) == func;
 }