summary refs log tree commit diff
path: root/drivers/base
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
parent38dbfb59d1175ef458d006556061adeaa8751b72 (diff)
downloadlinux-756173285e87c792c6fa8eaaaf1217cfcf1416dd.tar.gz
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')
-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;