regmap: spmi: Fix regmap_spmi_ext_read in multi-byte case
commit24a50739c3e4e9947f4f4a28a023c348d7bea042
authorJack Pham <jackp@codeaurora.org>
Fri, 15 Apr 2016 06:37:26 +0000 (14 23:37 -0700)
committerSasha Levin <sasha.levin@oracle.com>
Tue, 17 May 2016 17:42:37 +0000 (17 13:42 -0400)
tree47298e1a2d6f3b21c5f85cda16fedb25c72692f2
parenteab51598c1b3a48f320ea66fe1e0d58b61fa6c70
regmap: spmi: Fix regmap_spmi_ext_read in multi-byte case

[ Upstream commit dec8e8f6e6504aa3496c0f7cc10c756bb0e10f44 ]

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
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
drivers/base/regmap/regmap-spmi.c