diff options
author | Ping Cheng <pinglinux@gmail.com> | 2011-08-16 03:17:57 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2011-08-16 03:21:52 -0400 |
commit | 3b48c91cdf2d6827ce315b3b112310fa02198db0 (patch) | |
tree | 5a140a55c3e0ca2c9dee714755b14e159c815395 /drivers/input/tablet | |
parent | a417ea4432db7fd1c91c19b129a3e3d2367b7ce4 (diff) |
Input: wacom - report id 3 returns 4 bytes of data
Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/tablet')
-rw-r--r-- | drivers/input/tablet/wacom_sys.c | 10 |
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 { |