Commit d3d1e308 authored by Adam Kropelin's avatar Adam Kropelin Committed by Greg Kroah-Hartman

[PATCH] USB: Stop hiddev generating empty events

hiddev is mistakenly returning empty hiddev_event structures for report
events. According to Documentation/usb/hiddev.txt, report events are
only sent when HIDDEV_FLAG_REPORT and HIDDEV_FLAG_UREF are both set.
Currently, report events from hid cause hiddev to generate empty
hiddev_event events when HIDDEV_FLAG_UREF is not set.
parent a59205e0
......@@ -213,6 +213,7 @@ void hiddev_report_event(struct hid_device *hid, struct hid_report *report)
((type == HID_OUTPUT_REPORT) ? HID_REPORT_TYPE_OUTPUT :
((type == HID_FEATURE_REPORT) ? HID_REPORT_TYPE_FEATURE:0));
uref.report_id = report->id;
uref.field_index = HID_FIELD_INDEX_NONE;
hiddev_send_event(hid, &uref);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment