public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] HID: cp2112: fix I2C_SMBUS_BYTE write
@ 2015-07-13 22:23 Ellen Wang
  2015-07-14  8:46 ` Antonio Borneo
       [not found] ` <1436826234-2447-1-git-send-email-ellen-qUQiAmfTcIp+XZJcv9eMoEEOCMrvLtNR@public.gmane.org>
  0 siblings, 2 replies; 8+ messages in thread
From: Ellen Wang @ 2015-07-13 22:23 UTC (permalink / raw)
  To: borneo.antonio, dbarksdale, jkosina, linux-input, linux-i2c; +Cc: ellen

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>
---
Forgot signed-off-by tag last time, sorry.
---
 drivers/hid/hid-cp2112.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/hid/hid-cp2112.c b/drivers/hid/hid-cp2112.c
index a3703b8..7afc3fc 100644
--- a/drivers/hid/hid-cp2112.c
+++ b/drivers/hid/hid-cp2112.c
@@ -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:
-- 
1.9.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-07-14 22:54 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-13 22:23 [PATCH v2] HID: cp2112: fix I2C_SMBUS_BYTE write Ellen Wang
2015-07-14  8:46 ` Antonio Borneo
     [not found] ` <1436826234-2447-1-git-send-email-ellen-qUQiAmfTcIp+XZJcv9eMoEEOCMrvLtNR@public.gmane.org>
2015-07-14 11:49   ` Wolfram Sang
2015-07-14 12:54     ` Jiri Kosina
     [not found]       ` <alpine.LNX.2.00.1507141452140.7522-ztGlSCb7Y1iN3ZZ/Hiejyg@public.gmane.org>
2015-07-14 13:36         ` Antonio Borneo
     [not found]           ` <CAAj6DX2_ZwFqpKD5JjbWuJw7SJv3G+DhpnD6tZAoDcF32GQ=0Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-07-14 15:49             ` Wolfram Sang
2015-07-14 22:51               ` Ellen Wang
2015-07-14 22:54       ` Ellen Wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox