Skip to content

Commit

Permalink
XXX: test: asus-ec: Use i2c_smbus_read_block_data()
Browse files Browse the repository at this point in the history
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
  • Loading branch information
digetx committed Feb 12, 2022
1 parent 852498a commit aa8d71f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion drivers/mfd/asus-ec.c
Expand Up @@ -164,7 +164,7 @@ static int asus_ec_write(struct asus_ec_data *priv, u16 data)

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

dev_dbg(&priv->self->dev, "EC read: %*ph, ret = %d%s\n", 8, priv->ec_data,
ret, in_irq ? "; in irq" : "");
Expand Down
5 changes: 2 additions & 3 deletions drivers/misc/asus-dockram.c
Expand Up @@ -27,8 +27,7 @@ int asus_dockram_read(struct i2c_client *client, int reg, char *buf)
int rc;

memset(buf, 0, DOCKRAM_ENTRY_BUFSIZE);
rc = i2c_smbus_read_i2c_block_data(client, reg, DOCKRAM_ENTRY_BUFSIZE,
buf);
rc = i2c_smbus_read_block_data(client, reg, buf);
if (rc < 0)
return rc;

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

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

return i2c_smbus_write_i2c_block_data(client, reg, buf[0] + 1, buf);
return i2c_smbus_write_block_data(client, reg, buf[0] + 1, buf);
}
EXPORT_SYMBOL_GPL(asus_dockram_write);

Expand Down

0 comments on commit aa8d71f

Please sign in to comment.