From 40c5cc263954444f5a76cbf25d408c42da480122 Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Sun, 24 Jul 2011 22:39:12 +0100 Subject: [PATCH] regmap: Fix bulk reads We should be reading the number of bytes we were asked for, not the size of a single register. Signed-off-by: Mark Brown --- drivers/base/regmap/regmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c index cf3565cae93..0eef4da1ac6 100644 --- a/drivers/base/regmap/regmap.c +++ b/drivers/base/regmap/regmap.c @@ -317,7 +317,7 @@ static int _regmap_raw_read(struct regmap *map, unsigned int reg, void *val, u8[0] |= map->bus->read_flag_mask; ret = map->bus->read(map->dev, map->work_buf, map->format.reg_bytes, - val, map->format.val_bytes); + val, val_len); if (ret != 0) return ret; -- 2.39.5