diff options
author | Dimitris Papastamos <dp@opensource.wolfsonmicro.com> | 2011-09-29 14:36:26 +0100 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-09-30 13:57:47 +0100 |
commit | beb1a10f219ce720c13168203bd5ebe4ce7879e0 (patch) | |
tree | 99c7f842621284fcf9313a77f963ad4dfbd0a018 /drivers/base | |
parent | 13753a9088af23c61e2f5c10a8f3ea136d8ebab5 (diff) | |
download | linux-beb1a10f219ce720c13168203bd5ebe4ce7879e0.tar.bz2 |
regmap: Save/restore the bypass state upon syncing
Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/regmap/regcache.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/base/regmap/regcache.c b/drivers/base/regmap/regcache.c index 59e432c0163d..5dbc5076267e 100644 --- a/drivers/base/regmap/regcache.c +++ b/drivers/base/regmap/regcache.c @@ -227,10 +227,13 @@ int regcache_sync(struct regmap *map) unsigned int val; unsigned int i; const char *name; + unsigned int bypass; BUG_ON(!map->cache_ops); mutex_lock(&map->lock); + /* Remember the initial bypass state */ + bypass = map->cache_bypass; dev_dbg(map->dev, "Syncing %s cache\n", map->cache_ops->name); name = map->cache_ops->name; @@ -255,6 +258,8 @@ int regcache_sync(struct regmap *map) } out: trace_regcache_sync(map->dev, name, "stop"); + /* Restore the bypass state */ + map->cache_bypass = bypass; mutex_unlock(&map->lock); return ret; |