diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-03-05 23:28:49 (GMT) |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-03-05 23:49:24 (GMT) |
commit | f9353e70bcebd00cd182d946083afd7d8eddd259 (patch) | |
tree | a13460f9e9e88796067c24f0853c8a386413f022 /drivers/base/regmap | |
parent | a0941e562e8008804f9fe4400315ceb164752fac (diff) | |
download | linux-fsl-qoriq-f9353e70bcebd00cd182d946083afd7d8eddd259.tar.xz |
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>
Diffstat (limited to 'drivers/base/regmap')
-rw-r--r-- | drivers/base/regmap/regcache-rbtree.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/base/regmap/regcache-rbtree.c b/drivers/base/regmap/regcache-rbtree.c index bae183c..313c20f 100644 --- a/drivers/base/regmap/regcache-rbtree.c +++ b/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; |