Browse Source

regmap: Fix rbtree block base in sync

Otherwise we'll end up running with bogus register numbers.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Mark Brown 13 years ago
parent
commit
f9353e70bc
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/base/regmap/regcache-rbtree.c

+ 1 - 1
drivers/base/regmap/regcache-rbtree.c

@@ -379,7 +379,7 @@ static int regcache_rbtree_sync(struct regmap *map, unsigned int min,
 		if (rbnode->base_reg + rbnode->blklen < min)
 			continue;
 
-		if (min < rbnode->base_reg + rbnode->blklen)
+		if (min > rbnode->base_reg)
 			base = min - rbnode->base_reg;
 		else
 			base = 0;