regmap: debugfs: Fix return from regmap_debugfs_get_dump_start
authorSrinivas Kandagatla <srinivas.kandagatla@st.com>
Tue, 14 May 2013 06:54:23 +0000 (07:54 +0100)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Tue, 14 May 2013 12:53:45 +0000 (16:53 +0400)
regmap_debugfs_get_dump_start should return the offset of the register
it should start reading from, However in the current code at one point
the code does not return correct register offset.

With this patch all the returns from this function takes reg_stride in
to consideration to return correct offset.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@st.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
drivers/base/regmap/regmap-debugfs.c

index 8772fb77e6ed3fbe2c88d9b70389c7bd7608c818..98cb94e58320d411c7c3a23b819ce8816eba6212 100644 (file)
@@ -145,7 +145,7 @@ static unsigned int regmap_debugfs_get_dump_start(struct regmap *map,
                        reg_offset = fpos_offset / map->debugfs_tot_len;
                        *pos = c->min + (reg_offset * map->debugfs_tot_len);
                        mutex_unlock(&map->cache_lock);
-                       return c->base_reg + reg_offset;
+                       return c->base_reg + (reg_offset * map->reg_stride);
                }
 
                *pos = c->max;
This page took 0.027418 seconds and 5 git commands to generate.