Skip to content

Commit

Permalink
HID: picoLCD: fix dumping of IR_DATA report
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Bruno Prémont authored and Jiri Kosina committed Sep 5, 2012
1 parent 63583c6 commit f2df5b7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/hid/hid-picolcd_debugfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit f2df5b7

Please sign in to comment.