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 <dgr...@chromium.org>
---
 drivers/base/regmap/regcache.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/base/regmap/regcache.c b/drivers/base/regmap/regcache.c
index c6b1ac1..44af125 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;
 
-- 
1.8.1.3.605.g02339dd

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to