diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-03-06 03:31:39 +0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-03-06 03:48:50 +0400 |
commit | 994f5db65ef4b83db0321842bd43c6bc0a51f000 (patch) | |
tree | 633121617abdf0799462b87ed19dd4cc7b2f2f56 /drivers/base/regmap/regcache-rbtree.c | |
parent | 19694b5ea1d3a723dafe9544b5ee9a935414dc28 (diff) | |
download | linux-994f5db65ef4b83db0321842bd43c6bc0a51f000.tar.xz |
regcache: Make sure we sync register 0 in an rbtree cache
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>
Diffstat (limited to 'drivers/base/regmap/regcache-rbtree.c')
-rw-r--r-- | 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 32620c4f1683..861ad2c81dff 100644 --- a/drivers/base/regmap/regcache-rbtree.c +++ b/drivers/base/regmap/regcache-rbtree.c @@ -377,7 +377,7 @@ static int regcache_rbtree_sync(struct regmap *map) /* 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; |