|
@@ -1194,8 +1194,10 @@ int hid_report_raw_event(struct hid_device *hid, int type, u8 *data, int size,
|
|
|
goto out;
|
|
|
}
|
|
|
|
|
|
- for (a = 0; a < report->maxfield; a++)
|
|
|
- hid_input_field(hid, report->field[a], cdata, interrupt);
|
|
|
+ if (hid->claimed != HID_CLAIMED_HIDRAW) {
|
|
|
+ for (a = 0; a < report->maxfield; a++)
|
|
|
+ hid_input_field(hid, report->field[a], cdata, interrupt);
|
|
|
+ }
|
|
|
|
|
|
if (hid->claimed & HID_CLAIMED_INPUT)
|
|
|
hidinput_report_event(hid, report);
|
|
@@ -1243,6 +1245,10 @@ int hid_input_report(struct hid_device *hid, int type, u8 *data, int size, int i
|
|
|
goto unlock;
|
|
|
}
|
|
|
|
|
|
+ /* Avoid unnecessary overhead if debugfs is disabled */
|
|
|
+ if (list_empty(&hid->debug_list))
|
|
|
+ goto nomem;
|
|
|
+
|
|
|
buf = kmalloc(sizeof(char) * HID_DEBUG_BUFSIZE, GFP_ATOMIC);
|
|
|
|
|
|
if (!buf)
|