aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base/regmap
diff options
context:
space:
mode:
authorDylan Reid <dgreid@chromium.org>2014-03-18 13:45:08 -0700
committerMark Brown <broonie@linaro.org>2014-03-19 10:38:54 +0000
commit756173285e87c792c6fa8eaaaf1217cfcf1416dd (patch)
treead1d3b9aaed5abe2f0a1f05b7b76f1910de4907a /drivers/base/regmap
parentLinus 3.14-rc1 (diff)
downloadlinux-dev-756173285e87c792c6fa8eaaaf1217cfcf1416dd.tar.xz
linux-dev-756173285e87c792c6fa8eaaaf1217cfcf1416dd.zip
regmap: cache: Step by stride in default sync
The default sync operation was still assuming a stride of one, fix it to respect the reg_stride set in the map. Signed-off-by: Dylan Reid <dgreid@chromium.org> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/base/regmap')
-rw-r--r--drivers/base/regmap/regcache.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/base/regmap/regcache.c b/drivers/base/regmap/regcache.c
index d4dd77134814..bb3ba42e0329 100644
--- a/drivers/base/regmap/regcache.c
+++ b/drivers/base/regmap/regcache.c
@@ -249,7 +249,7 @@ static int regcache_default_sync(struct regmap *map, unsigned int min,
{
unsigned int reg;
- for (reg = min; reg <= max; reg++) {
+ for (reg = min; reg <= max; reg += map->reg_stride) {
unsigned int val;
int ret;