Skip to contentSkip to conversation

mfd: twl-core: use i2c_check_functionality as boolean value

PATCH Applied Thorsten Blum 2 participants 2 messages May 5 – May 14

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

PATCH 1/1 mfd: twl-core: use i2c_check_functionality as boolean value

i2c_check_functionality() returns a boolean status rather than an error code - directly use it as a boolean value.

---
 drivers/mfd/twl-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mfd/twl-core.c +1 -1
index f89eda4a17fe..c024a28b057e 100644
@@ -754,7 +754,7 @@ twl_probe(struct i2c_client *client)
 		return status;
 	}
 
-	if (i2c_check_functionality(client->adapter, I2C_FUNC_I2C) == 0) {
+	if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) {
 		dev_dbg(&client->dev, "can't talk I2C?\n");
 		status = -EIO;
 		goto free;
maintainer Applied
#1 lore raw

Re: (subset) [PATCH] mfd: twl-core: use i2c_check_functionality as boolean value

Quoted 2 lines · Thorsten Blum

i2c_check_functionality() returns a boolean status rather than an error code - directly use it as a boolean value.

Applied, thanks!

[1/1] mfd: twl-core: use i2c_check_functionality as boolean value

      commit: 9d5664df0221e8529b06d71d6bdc7d4a214cba2d

--
Lee Jones [李琼斯]