Skip to content

Commit

Permalink
regmap: debugfs: Fix return from regmap_debugfs_get_dump_start
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Srinivas Kandagatla authored and Mark Brown committed May 14, 2013
1 parent f9e464a commit 213fa5d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/base/regmap/regmap-debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 213fa5d

Please sign in to comment.