linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] regmap: Reset device debugfs when reinitialising the cache
@ 2012-01-26 18:32 Mark Brown
  0 siblings, 0 replies; only message in thread
From: Mark Brown @ 2012-01-26 18:32 UTC (permalink / raw)
  To: linux-kernel; +Cc: patches, Mark Brown

Most of the data exposed via debugfs is for or from the cache so reset
all the debugfs configuration to make sure everything is up to date with
the latest configuration, especially if we're changing cache type.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
 drivers/base/regmap/regmap.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c
index a5b27fb..80507d5 100644
--- a/drivers/base/regmap/regmap.c
+++ b/drivers/base/regmap/regmap.c
@@ -278,6 +278,7 @@ int regmap_reinit_cache(struct regmap *map, const struct regmap_config *config)
 	mutex_lock(&map->lock);
 
 	regcache_exit(map);
+	regmap_debugfs_exit(map);
 
 	map->max_register = config->max_register;
 	map->writeable_reg = config->writeable_reg;
@@ -289,6 +290,8 @@ int regmap_reinit_cache(struct regmap *map, const struct regmap_config *config)
 	map->cache_bypass = false;
 	map->cache_only = false;
 
+	regmap_debugfs_init(map);
+
 	ret = regcache_init(map, config);
 
 	mutex_unlock(&map->lock);
-- 
1.7.9.rc1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2012-01-26 18:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-26 18:32 [PATCH] regmap: Reset device debugfs when reinitialising the cache Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).