mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-12 13:55:32 +00:00
regmap: Use helper function for register offset
As a helper function exists for calculating register offsets lets use that rather than open coding with the reg_stride. Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
9ae27a8d1f
commit
45abcc5567
1 changed files with 1 additions and 1 deletions
|
@ -1993,7 +1993,7 @@ int regmap_bulk_write(struct regmap *map, unsigned int reg, const void *val,
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = regmap_write(map, reg + (i * map->reg_stride),
|
ret = regmap_write(map, reg + regmap_get_offset(map, i),
|
||||||
ival);
|
ival);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
Loading…
Reference in a new issue