regmap: debugfs: Fix check for block start in cached seeks
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Tue, 8 Jan 2013 20:40:19 +0000 (20:40 +0000)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Tue, 8 Jan 2013 20:52:45 +0000 (20:52 +0000)
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>
drivers/base/regmap/regmap-debugfs.c

index 43d51dc3d58b3627c266bb0cad548474ff930640..e8d15db2f126baed00c3b2cdc94316d76122e92f 100644 (file)
@@ -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;
                }