mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-22 08:49:45 +00:00
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: f01ee60fff
("regmap: implement register striding")
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
7928b2cbe5
commit
b8f9a03b74
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue