提交 384318ec 编写于 作者: P Ping Cheng 提交者: Dmitry Torokhov

Input: wacom - fix TabletPC touch bug

This patch fixed a bug that was introduced in kernel 2.6.28 for
TabletPC touch data. The wacom_parse_hid routine in wacom_sys.c
should always return 0 even when usb_control_msg got an error.
Signed-off-by: NPing Cheng <pingc@wacom.com>
Signed-off-by: NDmitry Torokhov <dtor@mail.ru>
上级 6b9ff696
......@@ -11,7 +11,7 @@
* Copyright (c) 2000 Daniel Egger <egger@suse.de>
* Copyright (c) 2001 Frederic Lepied <flepied@mandrakesoft.com>
* Copyright (c) 2004 Panagiotis Issaris <panagiotis.issaris@mech.kuleuven.ac.be>
* Copyright (c) 2002-2008 Ping Cheng <pingc@wacom.com>
* Copyright (c) 2002-2009 Ping Cheng <pingc@wacom.com>
*
* ChangeLog:
* v0.1 (vp) - Initial release
......@@ -67,6 +67,7 @@
* v1.47 (pc) - Added support for Bamboo
* v1.48 (pc) - Added support for Bamboo1, BambooFun, and Cintiq 12WX
* v1.49 (pc) - Added support for USB Tablet PC (0x90, 0x93, and 0x9A)
* v1.50 (pc) - Fixed a TabletPC touch bug in 2.6.28
*/
/*
......@@ -87,7 +88,7 @@
/*
* Version Information
*/
#define DRIVER_VERSION "v1.49"
#define DRIVER_VERSION "v1.50"
#define DRIVER_AUTHOR "Vojtech Pavlik <vojtech@ucw.cz>"
#define DRIVER_DESC "USB Wacom Graphire and Wacom Intuos tablet driver"
#define DRIVER_LICENSE "GPL"
......
......@@ -289,6 +289,7 @@ static int wacom_parse_hid(struct usb_interface *intf, struct hid_descriptor *hi
5000); /* 5 secs */
} while (result < 0 && limit++ < 5);
/* No need to parse the Descriptor. It isn't an error though */
if (result < 0)
goto out;
......@@ -368,9 +369,8 @@ static int wacom_parse_hid(struct usb_interface *intf, struct hid_descriptor *hi
}
}
result = 0;
out:
result = 0;
kfree(report);
return result;
}
......@@ -425,6 +425,15 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i
endpoint = &intf->cur_altsetting->endpoint[0].desc;
/* Initialize touch_x_max and touch_y_max in case it is not defined */
if (wacom_wac->features->type == TABLETPC) {
features->touch_x_max = 1023;
features->touch_y_max = 1023;
} else {
features->touch_x_max = 0;
features->touch_y_max = 0;
}
/* TabletPC need to retrieve the physical and logical maximum from report descriptor */
if (wacom_wac->features->type == TABLETPC) {
if (usb_get_extra_descriptor(interface, HID_DEVICET_HID, &hid_desc)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册