regcache: Make sure we sync register 0 in an rbtree cache
Subsystems (2)
PATCH 1/1 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 <[email protected]>
--- drivers/base/regmap/regcache-rbtree.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/base/regmap/regcache-rbtree.c +1 -1
@@ -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 ;
Signature · 1 line
1.7.9.1