[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1358342651-19690-1-git-send-email-p.zabel@pengutronix.de>
Date: Wed, 16 Jan 2013 14:24:11 +0100
From: Philipp Zabel <p.zabel@...gutronix.de>
To: linux-kernel@...r.kernel.org
Cc: Mark Brown <broonie@...nsource.wolfsonmicro.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Philipp Zabel <p.zabel@...gutronix.de>
Subject: [PATCH] regmap: debugfs: Fix last entry store in the offset cache
Commit e8d6539c8a94b88fc7ca5d6bdd9eeb0e64b434e4
(regmap: debugfs: Make sure we store the last entry in the offset cache)
causes regmap_debugfs_get_dump_start to unconditionally return base if
the debugfs_off_cache is not empty when the function is called (because
c == NULL). This effectively causes all but the first read from
debugfs/regmap/*/registers to start from register position 0, which
in turn results in infinitely looping debugfs register map output.
Signed-off-by: Philipp Zabel <p.zabel@...gutronix.de>
---
drivers/base/regmap/regmap-debugfs.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/base/regmap/regmap-debugfs.c b/drivers/base/regmap/regmap-debugfs.c
index 46a213a..b3369e6 100644
--- a/drivers/base/regmap/regmap-debugfs.c
+++ b/drivers/base/regmap/regmap-debugfs.c
@@ -114,15 +114,15 @@ static unsigned int regmap_debugfs_get_dump_start(struct regmap *map,
p += map->debugfs_tot_len;
}
- }
- /* 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;
+ /* 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;
+ }
}
/*
--
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists