[PATCH 3.18] HID: debug: fix the ring buffer implementation