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:
Charles Keepax 2018-02-12 18:15:47 +00:00 committed by Mark Brown
parent 9ae27a8d1f
commit 45abcc5567
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0
1 changed files with 1 additions and 1 deletions

View File

@ -1993,7 +1993,7 @@ out:
return -EINVAL;
}
ret = regmap_write(map, reg + (i * map->reg_stride),
ret = regmap_write(map, reg + regmap_get_offset(map, i),
ival);
if (ret)
return ret;