summaryrefslogtreecommitdiffstats
path: root/drivers/hid
diff options
context:
space:
mode:
authorEllen Wang <ellen@cumulusnetworks.com>2015-07-13 15:23:54 -0700
committerLuis Henriques <luis.henriques@canonical.com>2015-09-28 10:21:30 +0100
commit3cb9567dd50451dc53d16c2af68a29ef6c0d03ae (patch)
treed9f801c598f7594bbd79a1eb11c288f63d9bdd78 /drivers/hid
parent9b04189c2c5cb513635d0e4912d5555a7cefa185 (diff)
downloadlinux-stable-3cb9567dd50451dc53d16c2af68a29ef6c0d03ae.tar.gz
linux-stable-3cb9567dd50451dc53d16c2af68a29ef6c0d03ae.tar.bz2
linux-stable-3cb9567dd50451dc53d16c2af68a29ef6c0d03ae.zip
HID: cp2112: fix I2C_SMBUS_BYTE write
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: Luis Henriques <luis.henriques@canonical.com>
Diffstat (limited to 'drivers/hid')
-rw-r--r--drivers/hid/hid-cp2112.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hid/hid-cp2112.c b/drivers/hid/hid-cp2112.c
index ffe69be882de..68d6d93cbec9 100644
--- a/drivers/hid/hid-cp2112.c
+++ b/drivers/hid/hid-cp2112.c
@@ -451,7 +451,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: