* [PATCH] regmap: Mark the cache as clean after a successful sync
@ 2012-02-23 22:06 Mark Brown
0 siblings, 0 replies; only message in thread
From: Mark Brown @ 2012-02-23 22:06 UTC (permalink / raw)
To: linux-kernel; +Cc: patches, Mark Brown
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>
---
drivers/base/regmap/regcache.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/drivers/base/regmap/regcache.c b/drivers/base/regmap/regcache.c
index 1124abc..938cb1d 100644
--- a/drivers/base/regmap/regcache.c
+++ b/drivers/base/regmap/regcache.c
@@ -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 */
--
1.7.9.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2012-02-23 22:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-23 22:06 [PATCH] regmap: Mark the cache as clean after a successful sync Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®