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

@@@ -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);
                }
        }