mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-22 08:49:45 +00:00
Merge remote-tracking branches 'regmap/fix/i2c' and 'regmap/fix/volatile' into regmap-linus
This commit is contained in:
commit
f981c6cc14
2 changed files with 1 additions and 5 deletions
|
@ -217,8 +217,6 @@ static int regmap_i2c_smbus_i2c_write(void *context, const void *data,
|
|||
|
||||
if (count < 1)
|
||||
return -EINVAL;
|
||||
if (count >= I2C_SMBUS_BLOCK_MAX)
|
||||
return -E2BIG;
|
||||
|
||||
--count;
|
||||
return i2c_smbus_write_i2c_block_data(i2c, ((u8 *)data)[0], count,
|
||||
|
@ -235,8 +233,6 @@ static int regmap_i2c_smbus_i2c_read(void *context, const void *reg,
|
|||
|
||||
if (reg_size != 1 || val_size < 1)
|
||||
return -EINVAL;
|
||||
if (val_size >= I2C_SMBUS_BLOCK_MAX)
|
||||
return -E2BIG;
|
||||
|
||||
ret = i2c_smbus_read_i2c_block_data(i2c, ((u8 *)reg)[0], val_size, val);
|
||||
if (ret == val_size)
|
||||
|
|
|
@ -174,7 +174,7 @@ static bool regmap_volatile_range(struct regmap *map, unsigned int reg,
|
|||
unsigned int i;
|
||||
|
||||
for (i = 0; i < num; i++)
|
||||
if (!regmap_volatile(map, reg + i))
|
||||
if (!regmap_volatile(map, reg + regmap_get_offset(map, i)))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
|
|
Loading…
Reference in a new issue