Skip to content

Commit

Permalink
regmap: debugfs: Fix check for block start in cached seeks
Browse files Browse the repository at this point in the history
Check for the block we were asked to start from, not the position we're
in.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
Mark Brown committed Jan 8, 2013
1 parent 120f805 commit 5a1d6d1
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 @@ -103,7 +103,7 @@ static unsigned int regmap_debugfs_get_dump_start(struct regmap *map,

/* Find the relevant block */
list_for_each_entry(c, &map->debugfs_off_cache, list) {
if (*pos >= c->min && *pos <= c->max) {
if (from >= c->min && from <= c->max) {
*pos = c->min;
return c->base_reg;
}
Expand Down

0 comments on commit 5a1d6d1

Please sign in to comment.