diff options
-rw-r--r-- | drivers/hid/hid-debug.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/hid/hid-debug.c b/drivers/hid/hid-debug.c index cd4ece6fdfb9..0c4e75573186 100644 --- a/drivers/hid/hid-debug.c +++ b/drivers/hid/hid-debug.c | |||
@@ -564,10 +564,10 @@ void hid_debug_event(struct hid_device *hdev, char *buf) | |||
564 | struct hid_debug_list *list; | 564 | struct hid_debug_list *list; |
565 | 565 | ||
566 | list_for_each_entry(list, &hdev->debug_list, node) { | 566 | list_for_each_entry(list, &hdev->debug_list, node) { |
567 | for (i = 0; i <= strlen(buf); i++) | 567 | for (i = 0; i < strlen(buf); i++) |
568 | list->hid_debug_buf[(list->tail + i) % (HID_DEBUG_BUFSIZE - 1)] = | 568 | list->hid_debug_buf[(list->tail + i) % HID_DEBUG_BUFSIZE] = |
569 | buf[i]; | 569 | buf[i]; |
570 | list->tail = (list->tail + i) % (HID_DEBUG_BUFSIZE - 1); | 570 | list->tail = (list->tail + i) % HID_DEBUG_BUFSIZE; |
571 | } | 571 | } |
572 | } | 572 | } |
573 | EXPORT_SYMBOL_GPL(hid_debug_event); | 573 | EXPORT_SYMBOL_GPL(hid_debug_event); |