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 <ckee...@opensource.cirrus.com>
---
 drivers/base/regmap/regmap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c
index 8594b02aa3e67..6342eaefc2189 100644
--- a/drivers/base/regmap/regmap.c
+++ b/drivers/base/regmap/regmap.c
@@ -1993,7 +1993,7 @@ int regmap_bulk_write(struct regmap *map, unsigned int 
reg, const void *val,
                                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;
-- 
2.11.0

Reply via email to