Commit 213fa5d9 authored by Srinivas Kandagatla's avatar Srinivas Kandagatla Committed by Mark Brown
Browse files

regmap: debugfs: Fix return from regmap_debugfs_get_dump_start



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: default avatarSrinivas Kandagatla <srinivas.kandagatla@st.com>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent f9e464a5
......@@ -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;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment