The touch width and height values are only one byte each on the MobileStudio Pro. This matches the same format as the DTH-1152, so merge the two cases together.
Fixes: cd79aac597 ("backport: MobileStudio Pro to 3.7, 2.6.38, 2.6.36, 2.6.30") Signed-off-by: Ping Cheng <ping.ch...@wacom.com> Signed-off-by: Jason Gerecke <jason.gere...@wacom.com> --- 2.6.30/wacom_wac.c | 8 +------- 2.6.36/wacom_wac.c | 8 +------- 2.6.38/wacom_wac.c | 14 +++----------- 3.7/wacom_wac.c | 14 +++----------- 4 files changed, 8 insertions(+), 36 deletions(-) diff --git a/2.6.30/wacom_wac.c b/2.6.30/wacom_wac.c index e3c1b23..8e2269c 100644 --- a/2.6.30/wacom_wac.c +++ b/2.6.30/wacom_wac.c @@ -1002,6 +1002,7 @@ static int wacom_multitouch_generic(struct wacom_wac *wacom) break; case WACOM_MSPROT: + case DTH1152T: prox = data[offset] & 0x1; contact_id = get_unaligned_le16(&data[offset + 1]); x = get_unaligned_le16(&data[offset + 3]); @@ -1015,13 +1016,6 @@ static int wacom_multitouch_generic(struct wacom_wac *wacom) y = get_unaligned_le16(&data[offset + 4]); break; - case DTH1152T: - prox = data[offset] & 0x1; - contact_id = get_unaligned_le16(&data[offset + 1]); - x = get_unaligned_le16(&data[offset + 3]); - y = get_unaligned_le16(&data[offset + 5]); - break; - default: continue; } diff --git a/2.6.36/wacom_wac.c b/2.6.36/wacom_wac.c index b3dae39..4d4f9dd 100644 --- a/2.6.36/wacom_wac.c +++ b/2.6.36/wacom_wac.c @@ -1353,6 +1353,7 @@ static int wacom_multitouch_generic(struct wacom_wac *wacom) break; case WACOM_MSPROT: + case DTH1152T: prox = data[offset] & 0x1; contact_id = get_unaligned_le16(&data[offset + 1]); x = get_unaligned_le16(&data[offset + 3]); @@ -1366,13 +1367,6 @@ static int wacom_multitouch_generic(struct wacom_wac *wacom) y = get_unaligned_le16(&data[offset + 4]); break; - case DTH1152T: - prox = data[offset] & 0x1; - contact_id = get_unaligned_le16(&data[offset + 1]); - x = get_unaligned_le16(&data[offset + 3]); - y = get_unaligned_le16(&data[offset + 5]); - break; - default: continue; } diff --git a/2.6.38/wacom_wac.c b/2.6.38/wacom_wac.c index 360e86d..e3b1190 100644 --- a/2.6.38/wacom_wac.c +++ b/2.6.38/wacom_wac.c @@ -1250,12 +1250,13 @@ static int wacom_multitouch_generic(struct wacom_wac *wacom) break; case WACOM_MSPROT: + case DTH1152T: prox = data[offset] & 0x1; contact_id = get_unaligned_le16(&data[offset + 1]); x = get_unaligned_le16(&data[offset + 3]); y = get_unaligned_le16(&data[offset + 5]); - w = get_unaligned_le16(&data[offset + 7]); - h = get_unaligned_le16(&data[offset + 9]); + w = data[offset + 7] * 133; + h = data[offset + 8] * 133; break; case INTUOSP2: @@ -1267,15 +1268,6 @@ static int wacom_multitouch_generic(struct wacom_wac *wacom) h = data[offset + 7]; break; - case DTH1152T: - prox = data[offset] & 0x1; - contact_id = get_unaligned_le16(&data[offset + 1]); - x = get_unaligned_le16(&data[offset + 3]); - y = get_unaligned_le16(&data[offset + 5]); - w = data[offset + 7] * 133; - h = data[offset + 8] * 133; - break; - default: continue; } diff --git a/3.7/wacom_wac.c b/3.7/wacom_wac.c index 6c821f8..6db702e 100644 --- a/3.7/wacom_wac.c +++ b/3.7/wacom_wac.c @@ -1230,12 +1230,13 @@ static int wacom_multitouch_generic(struct wacom_wac *wacom) break; case WACOM_MSPROT: + case DTH1152T: prox = data[offset] & 0x1; contact_id = get_unaligned_le16(&data[offset + 1]); x = get_unaligned_le16(&data[offset + 3]); y = get_unaligned_le16(&data[offset + 5]); - w = get_unaligned_le16(&data[offset + 7]); - h = get_unaligned_le16(&data[offset + 9]); + w = data[offset + 7] * 133; + h = data[offset + 8] * 133; break; case INTUOSP2: @@ -1247,15 +1248,6 @@ static int wacom_multitouch_generic(struct wacom_wac *wacom) h = data[offset + 7]; break; - case DTH1152T: - prox = data[offset] & 0x1; - contact_id = get_unaligned_le16(&data[offset + 1]); - x = get_unaligned_le16(&data[offset + 3]); - y = get_unaligned_le16(&data[offset + 5]); - w = data[offset + 7] * 133; - h = data[offset + 8] * 133; - break; - default: continue; } -- 2.15.1 ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Linuxwacom-devel mailing list Linuxwacom-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel