From: Dimitris Papastamos Date: Wed, 28 Sep 2011 10:43:45 +0000 (+0100) Subject: regmap: Grab the lock in regcache_cache_only() X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=38f6916976f9e964748f097be3688e334fb60f3d;p=linux-beck.git 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 f46e247912cb..744ed145bfa4 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);