Skip to content

Commit

Permalink
regmap: Mark the cache as clean after a successful sync
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mark Brown committed Feb 23, 2012
1 parent c3ec232 commit 6ff7373
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/base/regmap/regcache.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 6ff7373

Please sign in to comment.