]> Pileus Git - ~andy/linux/commitdiff
Merge tag 'regmap-3.4' into regmap-stride
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Sat, 12 May 2012 12:06:08 +0000 (13:06 +0100)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Sat, 12 May 2012 12:06:08 +0000 (13:06 +0100)
regmap: Last minute bug fix for 3.4

This is a last minute bug fix that was only just noticed since the code
path that's being exercised here is one that is fairly rarely used.  The
changelog for the change itself is extremely clear and the code itself
is obvious to inspection so should be pretty safe.

Conflicts:
drivers/base/regmap/regmap.c (overlap between the fix and stride code)

1  2 
drivers/base/regmap/regmap.c

index fcd69ff695d593c268fad08d45ae195293727b07,bb80853ff27a9d25e1003a25edec0d21cbe8c2ad..357294905793c840aea6826262bbab4dda2d3660
@@@ -898,10 -775,11 +898,12 @@@ int regmap_bulk_read(struct regmap *map
                        map->format.parse_val(val + i);
        } else {
                for (i = 0; i < val_count; i++) {
 -                      ret = regmap_read(map, reg + i, &ival);
+                       unsigned int ival;
-                                         val + (i * val_bytes));
 +                      ret = regmap_read(map, reg + (i * map->reg_stride),
++                                        &ival);
                        if (ret != 0)
                                return ret;
+                       memcpy(val + (i * val_bytes), &ival, val_bytes);
                }
        }