From: Mark Brown Date: Sun, 24 Jul 2011 21:39:12 +0000 (+0100) Subject: regmap: Fix bulk reads X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=40c5cc263954444f5a76cbf25d408c42da480122;p=openwrt%2Fstaging%2Fblogic.git 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 --- diff --git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c index cf3565cae93d..0eef4da1ac61 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;