提交 6d00d153 编写于 作者: E Ellen Wang 提交者: Jiri Kosina

HID: cp2112: fix I2C_SMBUS_BYTE write

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: NEllen Wang <ellen@cumulusnetworks.com>
Acked-by: NWolfram Sang <wsa@the-dreams.de>
Reviewed-by: NAntonio Borneo <borneo.antonio@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: NJiri Kosina <jkosina@suse.com>
上级 44eda784
......@@ -606,7 +606,7 @@ static int cp2112_xfer(struct i2c_adapter *adap, u16 addr,
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:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册