Skip to contentSkip to conversation

HID: i2c-hid: print the correct data in dbg msg

PATCH In review Antonio Borneo 3 participants 3 messages Nov 16, 2014 – Nov 18, 2014 HID

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 HID: i2c-hid: print the correct data in dbg msg

From: Jean-Baptiste Maneyrol <[email protected]>

From: Jean-Baptiste Maneyrol <[email protected]>

Report is received in "buffer"; fix the following i2c_hid_dbg() to dump data from the correct pointer.

[Antonio Borneo: cleanup and rebase to v3.17]
---
 drivers/hid/i2c-hid/i2c-hid.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hid/i2c-hid/i2c-hid.c +1 -1
index 747d544..933bf10 100644
@@ -437,7 +437,7 @@ static void i2c_hid_init_report(struct hid_report *report, u8 *buffer,
 			report->id, buffer, size))
 		return;
 
-	i2c_hid_dbg(ihid, "report (len=%d): %*ph\n", size, size, ihid->inbuf);
+	i2c_hid_dbg(ihid, "report (len=%d): %*ph\n", size, size, buffer);
 
 	ret_size = buffer[0] | (buffer[1] << 8);
 
Signature · 1 line
2.1.3
#1 lore raw
Quoted 11 lines · Antonio Borneo

From: Jean-Baptiste Maneyrol <[email protected]>

From: Jean-Baptiste Maneyrol <[email protected]>

Report is received in "buffer"; fix the following i2c_hid_dbg() to dump data from the correct pointer.

[Antonio Borneo: cleanup and rebase to v3.17]

---

Good catch.

This one is Reviewed-by: Benjamin Tissoires <[email protected]>

Cheers,
Benjamin

Quoted 19 lines
 drivers/hid/i2c-hid/i2c-hid.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hid/i2c-hid/i2c-hid.c +1 -1
index 747d544..933bf10 100644
@@ -437,7 +437,7 @@ static void i2c_hid_init_report(struct hid_report *report, u8 *buffer,
 			report->id, buffer, size))
 		return;
 
-	i2c_hid_dbg(ihid, "report (len=%d): %*ph\n", size, size, ihid->inbuf);
+	i2c_hid_dbg(ihid, "report (len=%d): %*ph\n", size, size, buffer);
 
 	ret_size = buffer[0] | (buffer[1] << 8);
 
Signature · 1 line
2.1.3