[4.2.y-ckt stable] Patch "regmap: spmi: Fix regmap_spmi_ext_read in multi-byte case" has been added to the 4.2.y-ckt tree
Kamal Mostafa
kamal at canonical.com
Tue May 24 17:52:41 UTC 2016
This is a note to let you know that I have just added a patch titled
regmap: spmi: Fix regmap_spmi_ext_read in multi-byte case
to the linux-4.2.y-queue branch of the 4.2.y-ckt extended stable tree
which can be found at:
https://git.launchpad.net/~canonical-kernel/linux/+git/linux-stable-ckt/log/?h=linux-4.2.y-queue
This patch is scheduled to be released in version 4.2.8-ckt11.
If you, or anyone else, feels it should not be added to this tree, please
reply to this email.
For more information about the 4.2.y-ckt tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable
Thanks.
-Kamal
---8<------------------------------------------------------------
>From 99a267e6acdaa82c01ac75a6fa25a1483323e1b1 Mon Sep 17 00:00:00 2001
From: Jack Pham <jackp at codeaurora.org>
Date: Thu, 14 Apr 2016 23:37:26 -0700
Subject: 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 at codeaurora.org>
Signed-off-by: Mark Brown <broonie at kernel.org>
Signed-off-by: Kamal Mostafa <kamal at canonical.com>
---
drivers/base/regmap/regmap-spmi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/base/regmap/regmap-spmi.c b/drivers/base/regmap/regmap-spmi.c
index d7026dc..b394aae 100644
--- a/drivers/base/regmap/regmap-spmi.c
+++ b/drivers/base/regmap/regmap-spmi.c
@@ -153,7 +153,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;
--
2.7.4
More information about the kernel-team
mailing list