Commit a24f64a6 authored by Mark Brown's avatar Mark Brown

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.
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent 7e53b195
...@@ -278,6 +278,7 @@ int regmap_reinit_cache(struct regmap *map, const struct regmap_config *config) ...@@ -278,6 +278,7 @@ int regmap_reinit_cache(struct regmap *map, const struct regmap_config *config)
mutex_lock(&map->lock); mutex_lock(&map->lock);
regcache_exit(map); regcache_exit(map);
regmap_debugfs_exit(map);
map->max_register = config->max_register; map->max_register = config->max_register;
map->writeable_reg = config->writeable_reg; map->writeable_reg = config->writeable_reg;
...@@ -286,6 +287,8 @@ int regmap_reinit_cache(struct regmap *map, const struct regmap_config *config) ...@@ -286,6 +287,8 @@ int regmap_reinit_cache(struct regmap *map, const struct regmap_config *config)
map->precious_reg = config->precious_reg; map->precious_reg = config->precious_reg;
map->cache_type = config->cache_type; map->cache_type = config->cache_type;
regmap_debugfs_init(map);
ret = regcache_init(map, config); ret = regcache_init(map, config);
mutex_unlock(&map->lock); mutex_unlock(&map->lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment