提交 d9db7627 编写于 作者: M Mark Brown

regmap: Skip patch application when the cache is not dirty on sync

On the basis that if we don't actually need to resync the cache then the
patches are probably also already applied.
Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
上级 22f0d90a
......@@ -269,6 +269,9 @@ int regcache_sync(struct regmap *map)
name = map->cache_ops->name;
trace_regcache_sync(map->dev, name, "start");
if (!map->cache_dirty)
goto out;
/* Apply any patch first */
for (i = 0; i < map->patch_regs; i++) {
ret = _regmap_write(map, map->patch[i].reg, map->patch[i].def);
......@@ -279,8 +282,6 @@ int regcache_sync(struct regmap *map)
}
}
if (!map->cache_dirty)
goto out;
if (map->cache_ops->sync) {
ret = map->cache_ops->sync(map);
} else {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册