From 38f6916976f9e964748f097be3688e334fb60f3d Mon Sep 17 00:00:00 2001 From: Dimitris Papastamos Date: Wed, 28 Sep 2011 11:43:45 +0100 Subject: regmap: Grab the lock in regcache_cache_only() Signed-off-by: Dimitris Papastamos Signed-off-by: Mark Brown 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); -- cgit v0.10.2