mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] regcache: Make sure we sync register 0 in an rbtree cache
@ 2012-03-05 23:32 Mark Brown
  0 siblings, 0 replies; only message in thread
From: Mark Brown @ 2012-03-05 23:32 UTC (permalink / raw)
  To: linux-kernel; +Cc: patches, Mark Brown

Most of the current users have register 0 as a volatile register or don't
have a register 0 so it's not been apparent that it's not getting synced.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
 drivers/base/regmap/regcache-rbtree.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/base/regmap/regcache-rbtree.c b/drivers/base/regmap/regcache-rbtree.c
index 313c20f..8d51916 100644
--- a/drivers/base/regmap/regcache-rbtree.c
+++ b/drivers/base/regmap/regcache-rbtree.c
@@ -396,7 +396,7 @@ static int regcache_rbtree_sync(struct regmap *map, unsigned int min,
 
 			/* Is this the hardware default?  If so skip. */
 			ret = regcache_lookup_reg(map, i);
-			if (ret > 0 && val == map->reg_defaults[ret].def)
+			if (ret >= 0 && val == map->reg_defaults[ret].def)
 				continue;
 
 			map->cache_bypass = 1;
-- 
1.7.9.1


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-03-05 23:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-05 23:32 [PATCH] regcache: Make sure we sync register 0 in an rbtree cache 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®