Skip to content

Commit

Permalink
regcache: Make sure we sync register 0 in an rbtree cache
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mark Brown committed Mar 5, 2012
1 parent 19694b5 commit 994f5db
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/base/regmap/regcache-rbtree.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 994f5db

Please sign in to comment.