From: Ping Cheng <pi...@wacom.com> The HID descriptor for the Cintiq 27QHD touch contains a single-touch report which follows the multitouch report we're interested in. The wacom_parse_hid function does not properly parse the single-touch report, resulting in incorrect values being set. To prevent this from causing problems, do not change the values after they have been set properly while parsing the multitouch report.
Signed-off-by: Ping Cheng <pi...@wacom.com> Signed-off-by: Jason Gerecke <jason.gere...@wacom.com> --- 2.6.38/wacom_sys.c | 24 ++++++++++++++---------- 3.7/wacom_sys.c | 24 ++++++++++++++---------- 2 files changed, 28 insertions(+), 20 deletions(-) diff --git a/2.6.38/wacom_sys.c b/2.6.38/wacom_sys.c index 191ea92..fb6cc62 100644 --- a/2.6.38/wacom_sys.c +++ b/2.6.38/wacom_sys.c @@ -410,12 +410,14 @@ static int wacom_parse_hid(struct usb_interface *intf, break; case WACOM_27QHDT: - features->x_max = - get_unaligned_le16(&report[i - 4]); - features->x_phy = - get_unaligned_le16(&report[i - 7]); - features->unit = report[i - 13]; - features->unitExpo = report[i - 11]; + if (!features->x_max) { + features->x_max = + get_unaligned_le16(&report[i - 4]); + features->x_phy = + get_unaligned_le16(&report[i - 7]); + features->unit = report[i - 13]; + features->unitExpo = report[i - 11]; + } i += 9; break; @@ -472,10 +474,12 @@ static int wacom_parse_hid(struct usb_interface *intf, break; case WACOM_27QHDT: - features->y_max = - get_unaligned_le16(&report[i - 2]); - features->y_phy = - get_unaligned_le16(&report[i - 5]); + if (!features->y_max) { + features->y_max = + get_unaligned_le16(&report[i - 2]); + features->y_phy = + get_unaligned_le16(&report[i - 5]); + } i += 2; break; diff --git a/3.7/wacom_sys.c b/3.7/wacom_sys.c index 8afeeb2..5fc85e9 100644 --- a/3.7/wacom_sys.c +++ b/3.7/wacom_sys.c @@ -411,12 +411,14 @@ static int wacom_parse_hid(struct usb_interface *intf, break; case WACOM_27QHDT: - features->x_max = - get_unaligned_le16(&report[i - 4]); - features->x_phy = - get_unaligned_le16(&report[i - 7]); - features->unit = report[i - 13]; - features->unitExpo = report[i - 11]; + if (!features->x_max) { + features->x_max = + get_unaligned_le16(&report[i - 4]); + features->x_phy = + get_unaligned_le16(&report[i - 7]); + features->unit = report[i - 13]; + features->unitExpo = report[i - 11]; + } i += 9; break; @@ -473,10 +475,12 @@ static int wacom_parse_hid(struct usb_interface *intf, break; case WACOM_27QHDT: - features->y_max = - get_unaligned_le16(&report[i - 2]); - features->y_phy = - get_unaligned_le16(&report[i - 5]); + if (!features->y_max) { + features->y_max = + get_unaligned_le16(&report[i - 2]); + features->y_phy = + get_unaligned_le16(&report[i - 5]); + } i += 2; break; -- 1.9.1 ------------------------------------------------------------------------------ Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San Francisco, CA to explore cutting-edge tech and listen to tech luminaries present their vision of the future. This family event has something for everyone, including kids. Get more information and register today. http://sdm.link/attshape _______________________________________________ Linuxwacom-devel mailing list Linuxwacom-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel