aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/input/tablet/wacom_sys.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c
index 9879c73ee517..d27c9d91630b 100644
--- a/drivers/input/tablet/wacom_sys.c
+++ b/drivers/input/tablet/wacom_sys.c
@@ -320,23 +320,25 @@ static int wacom_query_tablet_data(struct usb_interface *intf, struct wacom_feat
320 int limit = 0, report_id = 2; 320 int limit = 0, report_id = 2;
321 int error = -ENOMEM; 321 int error = -ENOMEM;
322 322
323 rep_data = kmalloc(2, GFP_KERNEL); 323 rep_data = kmalloc(4, GFP_KERNEL);
324 if (!rep_data) 324 if (!rep_data)
325 return error; 325 return error;
326 326
327 /* ask to report tablet data if it is 2FGT Tablet PC or 327 /* ask to report tablet data if it is MT Tablet PC or
328 * not a Tablet PC */ 328 * not a Tablet PC */
329 if (features->type == TABLETPC2FG) { 329 if (features->type == TABLETPC2FG) {
330 do { 330 do {
331 rep_data[0] = 3; 331 rep_data[0] = 3;
332 rep_data[1] = 4; 332 rep_data[1] = 4;
333 rep_data[2] = 0;
334 rep_data[3] = 0;
333 report_id = 3; 335 report_id = 3;
334 error = usb_set_report(intf, WAC_HID_FEATURE_REPORT, 336 error = usb_set_report(intf, WAC_HID_FEATURE_REPORT,
335 report_id, rep_data, 2); 337 report_id, rep_data, 4);
336 if (error >= 0) 338 if (error >= 0)
337 error = usb_get_report(intf, 339 error = usb_get_report(intf,
338 WAC_HID_FEATURE_REPORT, report_id, 340 WAC_HID_FEATURE_REPORT, report_id,
339 rep_data, 3); 341 rep_data, 4);
340 } while ((error < 0 || rep_data[1] != 4) && limit++ < WAC_MSG_RETRIES); 342 } while ((error < 0 || rep_data[1] != 4) && limit++ < WAC_MSG_RETRIES);
341 } else if (features->type != TABLETPC) { 343 } else if (features->type != TABLETPC) {
342 do { 344 do {