regmap: debugfs: Suppress cache for partial register files
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Wed, 29 May 2013 14:54:54 +0000 (15:54 +0100)
committerMark Brown <broonie@linaro.org>
Wed, 19 Jun 2013 09:18:09 +0000 (10:18 +0100)
The cache is based on the full register map so confuses things if used
for a partial map.

Reported-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
drivers/base/regmap/regmap-debugfs.c

index 23b701f5fd2f6e9edbe6ad75f94bd760bea3e5fa..6864009948684b8d6cbd5bf1d9e0e846f7e1b809 100644 (file)
@@ -84,6 +84,10 @@ static unsigned int regmap_debugfs_get_dump_start(struct regmap *map,
        unsigned int fpos_offset;
        unsigned int reg_offset;
 
+       /* Suppress the cache if we're using a subrange */
+       if (from)
+               return from;
+
        /*
         * If we don't have a cache build one so we don't have to do a
         * linear scan each time.