lkml.org 
[lkml]   [2015]   [Sep]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.2 090/120] HID: cp2112: fix I2C_SMBUS_BYTE write
    Date
    4.2-stable review patch.  If anyone has any objections, please let me know.

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

    From: Ellen Wang <ellen@cumulusnetworks.com>

    commit 6d00d153f00097d259f86304e11858a50a1b8ad1 upstream.

    When doing an I2C_SMBUS_BYTE write (one byte write, no address),
    the data to be written is in "command" not "data->byte".

    Signed-off-by: Ellen Wang <ellen@cumulusnetworks.com>
    Acked-by: Wolfram Sang <wsa@the-dreams.de>
    Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
    Signed-off-by: Jiri Kosina <jkosina@suse.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

    ---
    drivers/hid/hid-cp2112.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    --- a/drivers/hid/hid-cp2112.c
    +++ b/drivers/hid/hid-cp2112.c
    @@ -554,7 +554,7 @@ static int cp2112_xfer(struct i2c_adapte
    if (I2C_SMBUS_READ == read_write)
    count = cp2112_read_req(buf, addr, read_length);
    else
    - count = cp2112_write_req(buf, addr, data->byte, NULL,
    + count = cp2112_write_req(buf, addr, command, NULL,
    0);
    break;
    case I2C_SMBUS_BYTE_DATA:



    \
     
     \ /
      Last update: 2015-09-19 20:21    [W:4.140 / U:0.004 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site