Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e42c5a9a authored by Mark Brown's avatar Mark Brown
Browse files

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: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: default avatarDimitris Papastamos <dp@opensource.wolfsonmicro.com>
parent 04e016ad
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -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)) {