OSDN Git Service

regmap: spmi: Fix regmap_spmi_ext_read in multi-byte case
authorJack Pham <jackp@codeaurora.org>
Fri, 15 Apr 2016 06:37:26 +0000 (23:37 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 19 May 2016 00:06:48 +0000 (17:06 -0700)
commit4e7e3f54cae7a6ea567c09d18c35bcc468b564c3
treedee9b0a7497e9367959295b68eb45898ceef90be
parent1fba064f789e053be80f1ee38c70abde71f584e2
regmap: spmi: Fix regmap_spmi_ext_read in multi-byte case

commit dec8e8f6e6504aa3496c0f7cc10c756bb0e10f44 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/base/regmap/regmap-spmi.c