summaryrefslogtreecommitdiffstats
path: root/drivers/base
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/base')
-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 f46e247912c..744ed145bfa 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);