summaryrefslogtreecommitdiff
path: root/drivers/base/regmap/regcache.c
diff options
context:
space:
mode:
authorDimitris Papastamos <dp@opensource.wolfsonmicro.com>2011-09-28 10:43:45 (GMT)
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-09-28 12:57:36 (GMT)
commit38f6916976f9e964748f097be3688e334fb60f3d (patch)
tree79b2bacf6db045d22a6127bb1b81fce48dedb511 /drivers/base/regmap/regcache.c
parentec8a365fe62c78a16268bd1d12dfbebc2b775991 (diff)
downloadlinux-38f6916976f9e964748f097be3688e334fb60f3d.tar.xz
regmap: Grab the lock in regcache_cache_only()
Signed-off-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/base/regmap/regcache.c')
-rw-r--r--drivers/base/regmap/regcache.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/base/regmap/regcache.c b/drivers/base/regmap/regcache.c
index f46e247..744ed145 100644
--- a/drivers/base/regmap/regcache.c
+++ b/drivers/base/regmap/regcache.c
@@ -273,7 +273,9 @@ EXPORT_SYMBOL_GPL(regcache_sync);
*/
void regcache_cache_only(struct regmap *map, bool enable)
{
+ mutex_lock(&map->sync_lock);
map->cache_only = enable;
+ mutex_unlock(&map->sync_lock);
}
EXPORT_SYMBOL_GPL(regcache_cache_only);