]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
MLK-10214-2: regmap: rbtree: Fix the shift issue.
authorShengjiu Wang <shengjiu.wang@freescale.com>
Mon, 9 Feb 2015 10:19:38 +0000 (18:19 +0800)
committerShengjiu Wang <shengjiu.wang@freescale.com>
Tue, 10 Feb 2015 03:09:32 +0000 (11:09 +0800)
The right shift should be changed to left shift. Lower register
address correspond to LSB of the cache_present, if right shift
old cache_present, the valid bits is moved out, then the new
cache_present is not correct.

Signed-off-by: Shengjiu Wang <shengjiu.wang@freescale.com>
drivers/base/regmap/regcache-rbtree.c

index 930cad4e5df8a10d7af43c42e2b3d0ebee3bf121..2b946bc4212dfb346ab521334277dafc162d7ad2 100644 (file)
@@ -313,7 +313,7 @@ static int regcache_rbtree_insert_to_block(struct regmap *map,
        if (pos == 0) {
                memmove(blk + offset * map->cache_word_size,
                        blk, rbnode->blklen * map->cache_word_size);
-               bitmap_shift_right(present, present, offset, blklen);
+               bitmap_shift_left(present, present, offset, blklen);
        }
 
        /* update the rbnode block, its size and the base register */