Commit 45abcc55 authored by Charles Keepax's avatar Charles Keepax Committed by Mark Brown

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: default avatarCharles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 9ae27a8d
...@@ -1993,7 +1993,7 @@ int regmap_bulk_write(struct regmap *map, unsigned int reg, const void *val, ...@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment