summaryrefslogtreecommitdiffstats
path: root/drivers/base
diff options
context:
space:
mode:
authorDimitris Papastamos <dp@opensource.wolfsonmicro.com>2011-09-28 11:43:42 +0100
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-09-28 13:56:39 +0100
commitec8a365fe62c78a16268bd1d12dfbebc2b775991 (patch)
tree11aafc8618736161bfbe6a189300aae3bcca707c /drivers/base
parenta40c282362419b8bccb75cea081992f535841085 (diff)
downloadlinux-ec8a365fe62c78a16268bd1d12dfbebc2b775991.tar.bz2
regmap: Modify map->cache_bypass directly
In preperation for the upcoming patches, modify map->cache_bypass directly. The helper functions will grab an exclusive lock. Because we'll have acquired the same lock we need to avoid a deadlock. 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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/base/regmap/regcache.c b/drivers/base/regmap/regcache.c
index 5364dde2ecd0..f46e247912cb 100644
--- a/drivers/base/regmap/regcache.c
+++ b/drivers/base/regmap/regcache.c
@@ -241,9 +241,9 @@ int regcache_sync(struct regmap *map)
ret = regcache_read(map, i, &val);
if (ret < 0)
goto out;
- regcache_cache_bypass(map, true);
+ map->cache_bypass = 1;
ret = regmap_write(map, i, val);
- regcache_cache_bypass(map, false);
+ map->cache_bypass = 0;
if (ret < 0)
goto out;
dev_dbg(map->dev, "Synced register %#x, value %#x\n",