[PATCH 15/31] hwmon: (pmbus/ir35221) use 4-argument i2c_smbus_read_block_data()
From: Dmitry Torokhov
Date: Sat Oct 24 2026 - 23:10:45 EST
Pass the size of the receive buffer to i2c_smbus_read_block_data() in
ir35221_probe().
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx>
---
drivers/hwmon/pmbus/ir35221.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/hwmon/pmbus/ir35221.c b/drivers/hwmon/pmbus/ir35221.c
index b2120fc76f40..346276efff87 100644
--- a/drivers/hwmon/pmbus/ir35221.c
+++ b/drivers/hwmon/pmbus/ir35221.c
@@ -79,7 +79,8 @@ static int ir35221_probe(struct i2c_client *client)
| I2C_FUNC_SMBUS_READ_BLOCK_DATA))
return -ENODEV;
- ret = i2c_smbus_read_block_data(client, PMBUS_MFR_ID, buf);
+ ret = i2c_smbus_read_block_data(client, PMBUS_MFR_ID,
+ sizeof(buf), buf);
if (ret < 0) {
dev_err(&client->dev, "Failed to read PMBUS_MFR_ID\n");
return ret;
@@ -89,7 +90,8 @@ static int ir35221_probe(struct i2c_client *client)
return -ENODEV;
}
- ret = i2c_smbus_read_block_data(client, PMBUS_MFR_MODEL, buf);
+ ret = i2c_smbus_read_block_data(client, PMBUS_MFR_MODEL,
+ sizeof(buf), buf);
if (ret < 0) {
dev_err(&client->dev, "Failed to read PMBUS_MFR_MODEL\n");
return ret;
--
2.56.0.257.gf7497c7d27-goog