dect
/
linux-2.6
Archived
13
0
Fork 0

regmap: debugfs: Make sure we store the last entry in the offset cache

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This commit is contained in:
Mark Brown 2013-01-08 18:47:52 +00:00
parent 5bd9f4bb34
commit e8d6539c8a
1 changed files with 9 additions and 0 deletions

View File

@ -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