summaryrefslogtreecommitdiffstats
path: root/drivers/base/regmap
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2011-10-09 15:30:02 +0200
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-10-10 11:25:00 +0200
commite42c5a9a4230c38ceba0a890b30a2d0dd9314bff (patch)
tree19fc12b745f2ff91a6a9dc29b6c2a3f5ffde1b99 /drivers/base/regmap
parentregmap: Warn on raw I/O as well as bulk reads that bypass cache (diff)
downloadlinux-e42c5a9a4230c38ceba0a890b30a2d0dd9314bff.tar.xz
linux-e42c5a9a4230c38ceba0a890b30a2d0dd9314bff.zip
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/regmap')
-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 887dbce63aff..52511f95857a 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)) {