aboutsummaryrefslogtreecommitdiff
path: root/drivers/base
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2011-10-09 14:30:02 +0100
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-10-10 10:25:00 +0100
commite42c5a9a4230c38ceba0a890b30a2d0dd9314bff (patch)
tree19fc12b745f2ff91a6a9dc29b6c2a3f5ffde1b99 /drivers/base
parent04e016adcae28b65ddc9e756947fa1526a51c0b5 (diff)
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>
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/regmap/regcache-rbtree.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/base/regmap/regcache-rbtree.c b/drivers/base/regmap/regcache-rbtree.c
index 887dbce63af..52511f95857 100644
--- a/drivers/base/regmap/regcache-rbtree.c
+++ b/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,
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)) {