diff options
author | Charles Keepax <ckeepax@opensource.cirrus.com> | 2018-02-12 18:15:45 +0000 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2018-02-13 12:26:12 +0000 |
commit | b8f9a03b741ddfdde4aa8b607fa7d88eb63a6338 (patch) | |
tree | 9c7d2814e2bafa8c16f59fd4b1eff36e8f43ee1b /drivers/base | |
parent | 7928b2cbe55b2a410a0f5c1f154610059c57b1b2 (diff) | |
download | talos-obmc-linux-b8f9a03b741ddfdde4aa8b607fa7d88eb63a6338.tar.gz talos-obmc-linux-b8f9a03b741ddfdde4aa8b607fa7d88eb63a6338.zip |
regmap: Correct offset handling in regmap_volatile_range
The current implementation is broken for regmaps that have a reg_stride,
since it doesn't take the stride into account. Correct this by using the
helper function to calculate the register offset.
Fixes: f01ee60fffa4 ("regmap: implement register striding")
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/regmap/regmap.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c index ee302ccdfbc8..f89d01e7b257 100644 --- a/drivers/base/regmap/regmap.c +++ b/drivers/base/regmap/regmap.c @@ -174,7 +174,7 @@ static bool regmap_volatile_range(struct regmap *map, unsigned int reg, unsigned int i; for (i = 0; i < num; i++) - if (!regmap_volatile(map, reg + i)) + if (!regmap_volatile(map, reg + regmap_get_offset(map, i))) return false; return true; |