aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c/chips
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/i2c/chips')
-rw-r--r--drivers/i2c/chips/eeprom.c6
-rw-r--r--drivers/i2c/chips/max6875.c1
2 files changed, 5 insertions, 2 deletions
diff --git a/drivers/i2c/chips/eeprom.c b/drivers/i2c/chips/eeprom.c
index bfce13c8f1ff..48f857ae8748 100644
--- a/drivers/i2c/chips/eeprom.c
+++ b/drivers/i2c/chips/eeprom.c
@@ -88,8 +88,10 @@ static void eeprom_update_client(struct i2c_client *client, u8 slice)
88 dev_dbg(&client->dev, "Starting eeprom update, slice %u\n", slice); 88 dev_dbg(&client->dev, "Starting eeprom update, slice %u\n", slice);
89 89
90 if (i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_READ_I2C_BLOCK)) { 90 if (i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_READ_I2C_BLOCK)) {
91 for (i = slice << 5; i < (slice + 1) << 5; i += I2C_SMBUS_BLOCK_MAX) 91 for (i = slice << 5; i < (slice + 1) << 5; i += 32)
92 if (i2c_smbus_read_i2c_block_data(client, i, data->data + i) != I2C_SMBUS_BLOCK_MAX) 92 if (i2c_smbus_read_i2c_block_data(client, i,
93 32, data->data + i)
94 != 32)
93 goto exit; 95 goto exit;
94 } else { 96 } else {
95 if (i2c_smbus_write_byte(client, slice << 5)) { 97 if (i2c_smbus_write_byte(client, slice << 5)) {
diff --git a/drivers/i2c/chips/max6875.c b/drivers/i2c/chips/max6875.c
index 76645c142977..e9e9e5171b53 100644
--- a/drivers/i2c/chips/max6875.c
+++ b/drivers/i2c/chips/max6875.c
@@ -106,6 +106,7 @@ static void max6875_update_slice(struct i2c_client *client, int slice)
106 I2C_FUNC_SMBUS_READ_I2C_BLOCK)) { 106 I2C_FUNC_SMBUS_READ_I2C_BLOCK)) {
107 if (i2c_smbus_read_i2c_block_data(client, 107 if (i2c_smbus_read_i2c_block_data(client,
108 MAX6875_CMD_BLK_READ, 108 MAX6875_CMD_BLK_READ,
109 SLICE_SIZE,
109 buf) != SLICE_SIZE) { 110 buf) != SLICE_SIZE) {
110 goto exit_up; 111 goto exit_up;
111 } 112 }