regmap: Reset cache status when reinitialsing the cache
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Fri, 20 Jan 2012 13:39:37 +0000 (13:39 +0000)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Fri, 20 Jan 2012 13:49:30 +0000 (13:49 +0000)
When we reinitialise the cache make sure that we reset the cache access
flags, ensuring that the reinitialised cache is in the default state
which is what callers would and do expect given the function name.

This is particularly likely to cause issues in systems where there was no
cache previously as those systems have cache bypass enabled, as for the
wm8994 driver where this was noticed.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
drivers/base/regmap/regmap.c

index be10a4ff660915625454375ce9fb30a97d5b7ef9..65558034318f3f295abde2fe7a599c4971e7d7ec 100644 (file)
@@ -284,6 +284,9 @@ int regmap_reinit_cache(struct regmap *map, const struct regmap_config *config)
        map->precious_reg = config->precious_reg;
        map->cache_type = config->cache_type;
 
+       map->cache_bypass = false;
+       map->cache_only = false;
+
        ret = regcache_init(map, config);
 
        mutex_unlock(&map->lock);
This page took 0.039943 seconds and 5 git commands to generate.