diff options
| author | Andi Shyti <andi.shyti@kernel.org> | 2026-09-09 18:27:23 +0200 |
|---|---|---|
| committer | Andi Shyti <andi.shyti@kernel.org> | 2026-09-09 18:27:23 +0200 |
| commit | 9a80b1b1ee3e5f2e5aa24f112f14bd45ada50833 (patch) | |
| tree | a8099ac64442b9d1c61531feb11ab58ee7bb45e5 | |
| parent | 5b93d13f76879001c7a8861942e72a89180c8bd7 (diff) | |
| parent | 4c76dc90f2d0f324b0f72faf1c82f8ed17d2ef6b (diff) | |
| download | linux-next-9a80b1b1ee3e5f2e5aa24f112f14bd45ada50833.tar.gz linux-next-9a80b1b1ee3e5f2e5aa24f112f14bd45ada50833.zip | |
Merge branch 'i2c/i2c' into i2c/i2c-next
| -rw-r--r-- | drivers/media/i2c/isl7998x.c | 3 | ||||
| -rw-r--r-- | include/linux/i2c.h | 4 |
2 files changed, 3 insertions, 4 deletions
diff --git a/drivers/media/i2c/isl7998x.c b/drivers/media/i2c/isl7998x.c index a77538d2343c..8244d4296a02 100644 --- a/drivers/media/i2c/isl7998x.c +++ b/drivers/media/i2c/isl7998x.c @@ -1460,8 +1460,7 @@ static int isl7998x_probe(struct i2c_client *client) int nr_inputs; int ret; - ret = i2c_check_functionality(adapter, I2C_FUNC_SMBUS_WORD_DATA); - if (!ret) { + if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_WORD_DATA)) { dev_warn(&adapter->dev, "I2C-Adapter doesn't support I2C_FUNC_SMBUS_WORD\n"); return -EIO; diff --git a/include/linux/i2c.h b/include/linux/i2c.h index 14ab4d3055af..4af2df969a05 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h @@ -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; } |
