regmap: Reset device debugfs when reinitialising the cache
Mark Brown [Thu, 26 Jan 2012 18:30:16 +0000 (18:30 +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.
cherry-picked from mainline commit
a24f64a648376766497fddd8bc24b1ca5b906431

Change-Id: I9db449602d9c37b22e024bf78a54fd7d09a07638
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/87581

Rebase-Id: R16701e5ad35b839aa899ff66f349f1b9cb59bc3a

drivers/base/regmap/regmap.c

index a5b27fb..d5be53a 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;
@@ -288,6 +289,7 @@ 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);