瀏覽代碼

regmap: Mark the cache as clean after a successful sync

Previously the cache would never be marked clean, meaning syncs would
never be suppressed which isn't the end of the world but could be
inefficient.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mark Brown 13 年之前
父節點
當前提交
6ff7373809
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      drivers/base/regmap/regcache.c

+ 3 - 0
drivers/base/regmap/regcache.c

@@ -285,6 +285,9 @@ int regcache_sync(struct regmap *map)
 
 	ret = map->cache_ops->sync(map);
 
+	if (ret == 0)
+		map->cache_dirty = false;
+
 out:
 	trace_regcache_sync(map->dev, name, "stop");
 	/* Restore the bypass state */