Skip to content

Commit

Permalink
regmap: Reset device debugfs when reinitialising the cache
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mark Brown committed Jan 26, 2012
1 parent 7e53b19 commit a24f64a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/base/regmap/regmap.c
Original file line number Diff line number Diff line change
@@ -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;
@@ -286,6 +287,8 @@ int regmap_reinit_cache(struct regmap *map, const struct regmap_config *config)
map->precious_reg = config->precious_reg;
map->cache_type = config->cache_type;

regmap_debugfs_init(map);

ret = regcache_init(map, config);

mutex_unlock(&map->lock);

0 comments on commit a24f64a

Please sign in to comment.