提交 3b48c91c 编写于 作者: P Ping Cheng 提交者: Dmitry Torokhov

Input: wacom - report id 3 returns 4 bytes of data

Signed-off-by: NPing Cheng <pingc@wacom.com>
Signed-off-by: NDmitry Torokhov <dtor@mail.ru>
上级 a417ea44
...@@ -320,23 +320,25 @@ static int wacom_query_tablet_data(struct usb_interface *intf, struct wacom_feat ...@@ -320,23 +320,25 @@ static int wacom_query_tablet_data(struct usb_interface *intf, struct wacom_feat
int limit = 0, report_id = 2; int limit = 0, report_id = 2;
int error = -ENOMEM; int error = -ENOMEM;
rep_data = kmalloc(2, GFP_KERNEL); rep_data = kmalloc(4, GFP_KERNEL);
if (!rep_data) if (!rep_data)
return error; return error;
/* ask to report tablet data if it is 2FGT Tablet PC or /* ask to report tablet data if it is MT Tablet PC or
* not a Tablet PC */ * not a Tablet PC */
if (features->type == TABLETPC2FG) { if (features->type == TABLETPC2FG) {
do { do {
rep_data[0] = 3; rep_data[0] = 3;
rep_data[1] = 4; rep_data[1] = 4;
rep_data[2] = 0;
rep_data[3] = 0;
report_id = 3; report_id = 3;
error = usb_set_report(intf, WAC_HID_FEATURE_REPORT, error = usb_set_report(intf, WAC_HID_FEATURE_REPORT,
report_id, rep_data, 2); report_id, rep_data, 4);
if (error >= 0) if (error >= 0)
error = usb_get_report(intf, error = usb_get_report(intf,
WAC_HID_FEATURE_REPORT, report_id, WAC_HID_FEATURE_REPORT, report_id,
rep_data, 3); rep_data, 4);
} while ((error < 0 || rep_data[1] != 4) && limit++ < WAC_MSG_RETRIES); } while ((error < 0 || rep_data[1] != 4) && limit++ < WAC_MSG_RETRIES);
} else if (features->type != TABLETPC) { } else if (features->type != TABLETPC) {
do { do {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册