Skip to content

Commit

Permalink
regmap: debugfs: Make sure we store the last entry in the offset cache
Browse files Browse the repository at this point in the history
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
Mark Brown committed Jan 8, 2013
1 parent 5bd9f4b commit e8d6539
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions drivers/base/regmap/regmap-debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,15 @@ static unsigned int regmap_debugfs_get_dump_start(struct regmap *map,
}
}

/* Close the last entry off if we didn't scan beyond it */
if (c) {
c->max = p - 1;
list_add_tail(&c->list,
&map->debugfs_off_cache);
} else {
return base;
}

/*
* This should never happen; we return above if we fail to
* allocate and we should never be in this code if there are
Expand Down

0 comments on commit e8d6539

Please sign in to comment.