diff options
author | Mark Brown <broonie@kernel.org> | 2018-01-12 20:03:55 +0000 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2018-01-12 20:03:55 +0000 |
commit | 86e41a2978d96aab854242a593682e594e146764 (patch) | |
tree | c60d689da39c21ccaf9beacc577a4145a998f042 /drivers/base | |
parent | b2cd1df66037e7c4697c7e40496bf7e4a5e16a2d (diff) | |
parent | 4c90f297ffcffb84e8667e4f447aeaba52a37220 (diff) |
Merge remote-tracking branch 'regmap/topic/core' into regmap-next
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/regmap/regmap.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c index 8d516a9bfc01..9fb3a792642b 100644 --- a/drivers/base/regmap/regmap.c +++ b/drivers/base/regmap/regmap.c @@ -2423,13 +2423,15 @@ static int _regmap_bus_read(void *context, unsigned int reg, { int ret; struct regmap *map = context; + void *work_val = map->work_buf + map->format.reg_bytes + + map->format.pad_bytes; if (!map->format.parse_val) return -EINVAL; - ret = _regmap_raw_read(map, reg, map->work_buf, map->format.val_bytes); + ret = _regmap_raw_read(map, reg, work_val, map->format.val_bytes); if (ret == 0) - *val = map->format.parse_val(map->work_buf); + *val = map->format.parse_val(work_val); return ret; } |