[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1330034783-8023-1-git-send-email-broonie@opensource.wolfsonmicro.com>
Date: Thu, 23 Feb 2012 22:06:23 +0000
From: Mark Brown <broonie@...nsource.wolfsonmicro.com>
To: linux-kernel@...r.kernel.org
Cc: patches@...nsource.wolfsonmicro.com,
Mark Brown <broonie@...nsource.wolfsonmicro.com>
Subject: [PATCH] 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 <broonie@...nsource.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists