HID: wacom: Move Graphire raport header check.
authorPrzemo Firszt <przemo@firszt.eu>
Tue, 15 May 2012 18:32:25 +0000 (19:32 +0100)
committerJiri Kosina <jkosina@suse.cz>
Wed, 16 May 2012 19:42:15 +0000 (21:42 +0200)
That check is valid only for Wacom Graphire, as the device raports always
start with 0x03. Intuos4 WL high-speed raports begin with 0x04, so
the check would be filtering out valid reports.

Signed-off-by: Przemo Firszt <przemo@firszt.eu>
Acked-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-wacom.c

index 29372edc31c0fdebefc54317020aba4ce7e01c69..4fc4eebe978486182db9bf7adeb0399b072eb351 100644 (file)
@@ -578,13 +578,15 @@ static int wacom_raw_event(struct hid_device *hdev, struct hid_report *report,
        hidinput = list_entry(hdev->inputs.next, struct hid_input, list);
        input = hidinput->input;
 
-       /* Check if this is a tablet report */
-       if (data[0] != 0x03)
-               return 0;
-
        switch (hdev->product) {
        case USB_DEVICE_ID_WACOM_GRAPHIRE_BLUETOOTH:
-               return wacom_gr_parse_report(hdev, wdata, input, data);
+               if (data[0] == 0x03) {
+                       return wacom_gr_parse_report(hdev, wdata, input, data);
+               } else {
+                       hid_err(hdev, "Unknown report: %d,%d size:%d\n",
+                                       data[0], data[1], size);
+                       return 0;
+               }
                break;
        case USB_DEVICE_ID_WACOM_INTUOS4_BLUETOOTH:
                i = 1;