From: Mark Brown Date: Thu, 23 Feb 2012 22:05:59 +0000 (+0000) Subject: regmap: Mark the cache as clean after a successful sync X-Git-Tag: firefly_0821_release~3680^2~3287^2~2^2~4 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=6ff7373809a9b4eb644d83e2e299da297e1cbffa;p=firefly-linux-kernel-4.4.55.git 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 --- diff --git a/drivers/base/regmap/regcache.c b/drivers/base/regmap/regcache.c index 4d43ed363481..46c42d3a4655 100644 --- a/drivers/base/regmap/regcache.c +++ b/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 */