From: Mark Brown Date: Wed, 29 May 2013 14:54:54 +0000 (+0100) Subject: regmap: debugfs: Suppress cache for partial register files X-Git-Tag: accepted/tizen/common/20141203.182822~1948^2~3^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d6814a7dafa590ec5fe0597922ea76354f9bec59;p=platform%2Fkernel%2Flinux-arm64.git regmap: debugfs: Suppress cache for partial register files The cache is based on the full register map so confuses things if used for a partial map. Reported-by: Bard Liao Signed-off-by: Mark Brown --- diff --git a/drivers/base/regmap/regmap-debugfs.c b/drivers/base/regmap/regmap-debugfs.c index 23b701f..6864009 100644 --- a/drivers/base/regmap/regmap-debugfs.c +++ b/drivers/base/regmap/regmap-debugfs.c @@ -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.