lkml.org 
[lkml]   [2016]   [May]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.5 061/101] regmap: spmi: Fix regmap_spmi_ext_read in multi-byte case
    Date
    4.5-stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Jack Pham <jackp@codeaurora.org>

    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 | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    --- 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 *co
    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;


    \
     
     \ /
      Last update: 2016-05-17 04:01    [W:4.083 / U:0.732 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site