未验证 提交 45abcc55 编写于 作者: C Charles Keepax 提交者: 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: NCharles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: NMark Brown <broonie@kernel.org>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册