From 38f6916976f9e964748f097be3688e334fb60f3d Mon Sep 17 00:00:00 2001 From: Dimitris Papastamos Date: Wed, 28 Sep 2011 11:43:45 +0100 Subject: [PATCH] regmap: Grab the lock in regcache_cache_only() Signed-off-by: Dimitris Papastamos Signed-off-by: Mark Brown --- drivers/base/regmap/regcache.c | 2 ++ 1 file changed, 2 insertions(+) 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); -- 2.39.5