diff options
author | Jack Pham <jackp@codeaurora.org> | 2016-04-15 06:37:26 (GMT) |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2016-04-15 09:11:45 (GMT) |
commit | dec8e8f6e6504aa3496c0f7cc10c756bb0e10f44 (patch) | |
tree | 34de6f16246dc114b3ae9e45e0cd1cd9d26577b0 /drivers/base/regmap | |
parent | f55532a0c0b8bb6148f4e07853b876ef73bc69ca (diff) | |
download | linux-dec8e8f6e6504aa3496c0f7cc10c756bb0e10f44.tar.xz |
regmap: spmi: Fix regmap_spmi_ext_read in multi-byte case
Specifically for the case of reads that use the Extended Register
Read Long command, a multi-byte read operation is broken up into
8-byte chunks. However the call to spmi_ext_register_readl() is
incorrectly passing 'val_size', which if greater than 8 will
always fail. The argument should instead be 'len'.
Fixes: c9afbb05a9ff ("regmap: spmi: support base and extended register spaces")
Signed-off-by: Jack Pham <jackp@codeaurora.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: stable@vger.kernel.org
Diffstat (limited to 'drivers/base/regmap')
-rw-r--r-- | drivers/base/regmap/regmap-spmi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/base/regmap/regmap-spmi.c b/drivers/base/regmap/regmap-spmi.c index 7e58f65..4a36e41 100644 --- a/drivers/base/regmap/regmap-spmi.c +++ b/drivers/base/regmap/regmap-spmi.c @@ -142,7 +142,7 @@ static int regmap_spmi_ext_read(void *context, while (val_size) { len = min_t(size_t, val_size, 8); - err = spmi_ext_register_readl(context, addr, val, val_size); + err = spmi_ext_register_readl(context, addr, val, len); if (err) goto err_out; |