linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] HID: wacom: Move Graphire raport header check.
@ 2012-05-15 18:32 Przemo Firszt
       [not found] ` <1337106748-28437-1-git-send-email-przemo-q9SP4D9nreWHXe+LvDLADg@public.gmane.org>
  2012-05-16 16:20 ` [PATCH 1/3] HID: wacom: Move Graphire raport header check Ping Cheng
  0 siblings, 2 replies; 8+ messages in thread
From: Przemo Firszt @ 2012-05-15 18:32 UTC (permalink / raw)
  To: pinglinux, jkosina
  Cc: linuxwacom-devel, linux-input, linux-kernel, Przemo Firszt

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>
---
 drivers/hid/hid-wacom.c |   12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/drivers/hid/hid-wacom.c b/drivers/hid/hid-wacom.c
index 29372ed..4fc4eeb 100644
--- a/drivers/hid/hid-wacom.c
+++ b/drivers/hid/hid-wacom.c
@@ -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;
-- 
1.7.10.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-05-17  7:33 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-15 18:32 [PATCH 1/3] HID: wacom: Move Graphire raport header check Przemo Firszt
     [not found] ` <1337106748-28437-1-git-send-email-przemo-q9SP4D9nreWHXe+LvDLADg@public.gmane.org>
2012-05-15 18:32   ` [PATCH 2/3] HID: wacom: Add speed setting for Intuos4 WL Przemo Firszt
2012-05-15 18:32   ` [PATCH 3/3] HID: wacom: unify speed setting Przemo Firszt
2012-05-15 18:36     ` Przemo Firszt
2012-05-15 18:32   ` [PATCH 3/3] HID: wacom: Unify " Przemo Firszt
2012-05-16 16:20 ` [PATCH 1/3] HID: wacom: Move Graphire raport header check Ping Cheng
2012-05-16 19:43   ` Jiri Kosina
2012-05-17  7:33     ` Przemo Firszt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).