Merge tag 'regmap-v3.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie...
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 27 Aug 2013 17:10:30 +0000 (10:10 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 27 Aug 2013 17:10:30 +0000 (10:10 -0700)
Pull regmap fixes from Mark Brown:
 "Two changes here:

   - Fix a bug in the rbtree code which could cause it to create two
     different cache entries for the same register by adding a single
     register at a time to the cache.  This isn't awesome for
     performance but it's non-invasive which we need for this late in
     the release cycle and the I/O costs we're trying to avoid are high.

   - Add another header used in the !CONFIG_REGMAP stubs where we had
     been relying on implicit inclusion"

* tag 'regmap-v3.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap:
  regmap: rbtree: Fix overlapping rbnodes.
  regmap: Add another missing header for !CONFIG_REGMAP stubs

drivers/base/regmap/regcache-rbtree.c
include/linux/regmap.h

index 5c1435c4e210c9311e01e92e9a0039ec89df2bdb..0fccc99881fdc55013ea0ad11d17091c7e8b642d 100644 (file)
@@ -332,7 +332,7 @@ regcache_rbtree_node_alloc(struct regmap *map, unsigned int reg)
        }
 
        if (!rbnode->blklen) {
-               rbnode->blklen = sizeof(*rbnode);
+               rbnode->blklen = 1;
                rbnode->base_reg = reg;
        }
 
index 580a5320cc96afd21807cddaaa40bdff47694d5d..6d91fcb4c5cb9dec57a043282150895d567f2601 100644 (file)
@@ -16,6 +16,7 @@
 #include <linux/list.h>
 #include <linux/rbtree.h>
 #include <linux/err.h>
+#include <linux/bug.h>
 
 struct module;
 struct device;