Skip to contentSkip to conversation

regmap: Mark the cache as clean after a successful sync

PATCH New Mark Brown 1 participant 1 message Feb 23, 2012

Subsystems (2)
lore
Share & tools
lore

Mark Brown

author
#0 lore raw

PATCH 1/1 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.

---
 drivers/base/regmap/regcache.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
drivers/base/regmap/regcache.c +3 -0
index 1124abc..938cb1d 100644
@@ -288,6 +288,9 @@ int regcache_sync(struct regmap *map)
 
 	ret = map->cache_ops->sync(map, 0, map->max_register);
 
+	if (ret == 0)
+		map->cache_dirty = false;
+
 out:
 	trace_regcache_sync(map->dev, name, "stop");
 	/* Restore the bypass state */
Signature · 1 line
1.7.9.1