Skip to content

Commit aa8d71f

Browse files
committed
XXX: test: asus-ec: Use i2c_smbus_read_block_data()
Signed-off-by: Dmitry Osipenko <[email protected]>
1 parent 852498a commit aa8d71f

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

drivers/mfd/asus-ec.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ static int asus_ec_write(struct asus_ec_data *priv, u16 data)
164164

165165
static int asus_ec_read(struct asus_ec_data *priv, bool in_irq)
166166
{
167-
int ret = i2c_smbus_read_i2c_block_data(priv->self, 0x6A, 8, priv->ec_data);
167+
int ret = i2c_smbus_read_block_data(priv->self, 0x6A, priv->ec_data);
168168

169169
dev_dbg(&priv->self->dev, "EC read: %*ph, ret = %d%s\n", 8, priv->ec_data,
170170
ret, in_irq ? "; in irq" : "");

drivers/misc/asus-dockram.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ int asus_dockram_read(struct i2c_client *client, int reg, char *buf)
2727
int rc;
2828

2929
memset(buf, 0, DOCKRAM_ENTRY_BUFSIZE);
30-
rc = i2c_smbus_read_i2c_block_data(client, reg, DOCKRAM_ENTRY_BUFSIZE,
31-
buf);
30+
rc = i2c_smbus_read_block_data(client, reg, buf);
3231
if (rc < 0)
3332
return rc;
3433

@@ -52,7 +51,7 @@ int asus_dockram_write(struct i2c_client *client, int reg, const char *buf)
5251

5352
dev_dbg(&client->dev, "sending data; buffer: %*ph\n", buf[0] + 1, buf);
5453

55-
return i2c_smbus_write_i2c_block_data(client, reg, buf[0] + 1, buf);
54+
return i2c_smbus_write_block_data(client, reg, buf[0] + 1, buf);
5655
}
5756
EXPORT_SYMBOL_GPL(asus_dockram_write);
5857

0 commit comments

Comments
 (0)