Skip to content

Commit

Permalink
regmap: Allow rbtree to cache zero default values
Browse files Browse the repository at this point in the history
Ensure that when we start up in cache only mode we can store defaults of
zero, otherwise if the hardware is unavailable we won't be able to read.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
  • Loading branch information
Mark Brown committed Oct 10, 2011
1 parent 04e016a commit e42c5a9
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions drivers/base/regmap/regcache-rbtree.c
Original file line number Diff line number Diff line change
Expand Up @@ -252,9 +252,6 @@ static int regcache_rbtree_write(struct regmap *map, unsigned int reg,
regcache_rbtree_set_register(rbnode, reg_tmp, value,
map->cache_word_size);
} else {
/* bail out early, no need to create the rbnode yet */
if (!value)
return 0;
/* look for an adjacent register to the one we are about to add */
for (node = rb_first(&rbtree_ctx->root); node;
node = rb_next(node)) {
Expand Down

0 comments on commit e42c5a9

Please sign in to comment.