From: Benjamin Tissoires <benjamin.tissoi...@redhat.com> The type is never set but we check for it in wacom_wireless_irq(). It looks like this is a big hack from the beginning, so fill in the gap only.
Untested. Signed-off-by: Benjamin Tissoires <benjamin.tissoi...@redhat.com> Acked-by: Ping Cheng <pi...@wacom.com> Signed-off-by: Jiri Kosina <jkos...@suse.cz> [aaron.sko...@wacom.com: Imported into input-wacom repository (97f9afa)] Signed-off-by: Aaron Armstrong Skomra <aaron.sko...@wacom.com> [aaron.sko...@wacom.com: Backported from input-wacom repository (ffd4ce9)] Signed-off-by: Aaron Armstrong Skomra <aaron.sko...@wacom.com> --- 2.6.38/wacom_sys.c | 10 +++++++--- 3.17/wacom_sys.c | 5 +++-- 3.7/wacom_sys.c | 14 +++++++++----- 3 files changed, 19 insertions(+), 10 deletions(-) diff --git a/2.6.38/wacom_sys.c b/2.6.38/wacom_sys.c index 9e2c5dc..5051811 100644 --- a/2.6.38/wacom_sys.c +++ b/2.6.38/wacom_sys.c @@ -1592,9 +1592,11 @@ static void wacom_wireless_work(struct work_struct *work) goto fail; if ((wacom_wac1->features.type == INTUOSHT || - wacom_wac1->features.type == INTUOSHT2) && - wacom_wac1->features.touch_max) + wacom_wac1->features.type == INTUOSHT2) && + wacom_wac1->features.touch_max) { + wacom_wac->shared->type = wacom_wac->features.type; wacom_wac->shared->touch_input = wacom_wac2->input; + } } error = wacom_initialize_battery(wacom); @@ -1731,8 +1733,10 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i if ((wacom_wac->features.type == INTUOSHT || wacom_wac->features.type == INTUOSHT2) && wacom_wac->features.touch_max) { - if (wacom_wac->features.device_type == BTN_TOOL_FINGER) + if (wacom_wac->features.device_type == BTN_TOOL_FINGER) { + wacom_wac->shared->type = wacom_wac->features.type; wacom_wac->shared->touch_input = wacom_wac->input; + } } return 0; diff --git a/3.17/wacom_sys.c b/3.17/wacom_sys.c index 8cda3e2..2ad83f5 100644 --- a/3.17/wacom_sys.c +++ b/3.17/wacom_sys.c @@ -1762,9 +1762,10 @@ static int wacom_parse_and_register(struct wacom *wacom, bool wireless) error = hid_hw_open(hdev); if ((wacom_wac->features.type == INTUOSHT || - wacom_wac->features.type == INTUOSHT2) && + wacom_wac->features.type == INTUOSHT2) && (wacom_wac->features.device_type & WACOM_DEVICETYPE_TOUCH)) { - wacom_wac->shared->touch_input = wacom_wac->touch_input; + wacom_wac->shared->type = wacom_wac->features.type; + wacom_wac->shared->touch_input = wacom_wac->touch_input; } return 0; diff --git a/3.7/wacom_sys.c b/3.7/wacom_sys.c index 9ba404a..102523d 100644 --- a/3.7/wacom_sys.c +++ b/3.7/wacom_sys.c @@ -1590,9 +1590,11 @@ static void wacom_wireless_work(struct work_struct *work) goto fail; if ((wacom_wac1->features.type == INTUOSHT || - wacom_wac1->features.type == INTUOSHT2) && - wacom_wac1->features.touch_max) + wacom_wac1->features.type == INTUOSHT2) && + wacom_wac1->features.touch_max) { + wacom_wac->shared->type = wacom_wac->features.type; wacom_wac->shared->touch_input = wacom_wac2->input; + } } error = wacom_initialize_battery(wacom); @@ -1727,10 +1729,12 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i } if ((wacom_wac->features.type == INTUOSHT || - wacom_wac->features.type == INTUOSHT2) && - wacom_wac->features.touch_max) { - if (wacom_wac->features.device_type == BTN_TOOL_FINGER) + wacom_wac->features.type == INTUOSHT2) && + wacom_wac->features.touch_max) { + if (wacom_wac->features.device_type == BTN_TOOL_FINGER) { + wacom_wac->shared->type = wacom_wac->features.type; wacom_wac->shared->touch_input = wacom_wac->input; + } } return 0; -- 2.7.4 ------------------------------------------------------------------------------ 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