瀏覽代碼

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>
Dimitris Papastamos 14 年之前
父節點
當前提交
38f6916976
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2 0
      drivers/base/regmap/regcache.c

+ 2 - 0
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);