浏览代码

regmap: Allow rbtree to cache zero default values

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>
Mark Brown 14 年之前
父节点
当前提交
e42c5a9a42
共有 1 个文件被更改,包括 0 次插入3 次删除
  1. 0 3
      drivers/base/regmap/regcache-rbtree.c

+ 0 - 3
drivers/base/regmap/regcache-rbtree.c

@@ -252,9 +252,6 @@ static int regcache_rbtree_write(struct regmap *map, unsigned int reg,
 		regcache_rbtree_set_register(rbnode, reg_tmp, value,
 		regcache_rbtree_set_register(rbnode, reg_tmp, value,
 					     map->cache_word_size);
 					     map->cache_word_size);
 	} else {
 	} 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 */
 		/* look for an adjacent register to the one we are about to add */
 		for (node = rb_first(&rbtree_ctx->root); node;
 		for (node = rb_first(&rbtree_ctx->root); node;
 		     node = rb_next(node)) {
 		     node = rb_next(node)) {