]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
regmap: Reset device debugfs when reinitialising the cache
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Thu, 26 Jan 2012 18:30:16 +0000 (18:30 +0000)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Thu, 26 Jan 2012 18:34:49 +0000 (18:34 +0000)
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

index e9c2ac0174c6e7702780f24763d8669cf0a34ea3..2d71aeae3109cadbeb65a678498d059445ac9fac 100644 (file)
@@ -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);