Skip to contentSkip to conversation

regmap: Reset device debugfs when reinitialising the cache

PATCH New Mark Brown 1 participant 1 message Jan 26, 2012

Subsystems (2)
lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH 1/1 regmap: Reset device debugfs when reinitialising the cache

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.

---
 drivers/base/regmap/regmap.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
drivers/base/regmap/regmap.c +3 -0
index a5b27fb..80507d5 100644
@@ -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);
Signature · 1 line
1.7.9.rc1