HID: picoLCD: fix dumping of IR_DATA report
authorBruno Prémont <bonbons@linux-vserver.org>
Sun, 19 Aug 2012 17:33:33 +0000 (19:33 +0200)
committerJiri Kosina <jkosina@suse.cz>
Wed, 5 Sep 2012 09:48:07 +0000 (11:48 +0200)
The first payload byte indicates how many IR data bytes are following, not
including itself. The IR data bytes appear in pairs as they represent a
series of 16bit intervals.

Signed-off-by: Bruno Prémont <bonbons@linux-vserver.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-picolcd_debugfs.c

index 2c7308c2ae1f949d1716e640fcffc596381b0904..eec85b53bb2c534ca2b1392eb1cc416c06764261 100644 (file)
@@ -703,9 +703,9 @@ void picolcd_debug_raw_event(struct picolcd_data *data,
                        hid_debug_event(hdev, buff);
                } else if (raw_data[1] + 1 <= size) {
                        snprintf(buff, BUFF_SZ, "\tData length: %d\n\tIR Data: ",
-                                       raw_data[1]-1);
+                                       raw_data[1]);
                        hid_debug_event(hdev, buff);
-                       dump_buff_as_hex(buff, BUFF_SZ, raw_data+2, raw_data[1]-1);
+                       dump_buff_as_hex(buff, BUFF_SZ, raw_data+2, raw_data[1]);
                        hid_debug_event(hdev, buff);
                } else {
                        snprintf(buff, BUFF_SZ, "\tOverflowing data length: %d\n",
This page took 0.041236 seconds and 5 git commands to generate.