aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Armstrong Skomra <skomra@gmail.com>2017-03-29 13:35:39 -0400
committerJiri Kosina <jkosina@suse.cz>2017-03-30 05:30:45 -0400
commit8b4073596997f2ccbf68d8e72e07b827388a4536 (patch)
treec1c306783346d4ee8e3244480a6a82f3620f4cd6
parent9257821c5a1dc57ef3a37f7cbcebaf548395c964 (diff)
HID: wacom: Don't add ghost interface as shared data
A previous commit (below) adds a check for already probed interfaces to Wacom's matching heuristic. Unfortunately this causes the Bamboo Pen (CTL-460) to match itself to its 'ghost' touch interface. After subsequent changes to the driver this match to the ghost causes the kernel to crash. This patch avoids calling wacom_add_shared_data() for the BAMBOO_PEN's ghost touch interface. Fixes: 41372d5d40e7 ("HID: wacom: Augment 'oVid' and 'oPid' with heuristics for HID_GENERIC") Cc: stable <stable@vger.kernel.org> # 4.9 Signed-off-by: Aaron Armstrong Skomra <aaron.skomra@wacom.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
-rw-r--r--drivers/hid/wacom_sys.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/hid/wacom_sys.c b/drivers/hid/wacom_sys.c
index 994bddc55b82..b676f02d4b7f 100644
--- a/drivers/hid/wacom_sys.c
+++ b/drivers/hid/wacom_sys.c
@@ -2165,6 +2165,14 @@ static int wacom_parse_and_register(struct wacom *wacom, bool wireless)
2165 2165
2166 wacom_update_name(wacom, wireless ? " (WL)" : ""); 2166 wacom_update_name(wacom, wireless ? " (WL)" : "");
2167 2167
2168 /* pen only Bamboo neither support touch nor pad */
2169 if ((features->type == BAMBOO_PEN) &&
2170 ((features->device_type & WACOM_DEVICETYPE_TOUCH) ||
2171 (features->device_type & WACOM_DEVICETYPE_PAD))) {
2172 error = -ENODEV;
2173 goto fail;
2174 }
2175
2168 error = wacom_add_shared_data(hdev); 2176 error = wacom_add_shared_data(hdev);
2169 if (error) 2177 if (error)
2170 goto fail; 2178 goto fail;
@@ -2212,14 +2220,6 @@ static int wacom_parse_and_register(struct wacom *wacom, bool wireless)
2212 goto fail_quirks; 2220 goto fail_quirks;
2213 } 2221 }
2214 2222
2215 /* pen only Bamboo neither support touch nor pad */
2216 if ((features->type == BAMBOO_PEN) &&
2217 ((features->device_type & WACOM_DEVICETYPE_TOUCH) ||
2218 (features->device_type & WACOM_DEVICETYPE_PAD))) {
2219 error = -ENODEV;
2220 goto fail_quirks;
2221 }
2222
2223 if (features->device_type & WACOM_DEVICETYPE_WL_MONITOR) 2223 if (features->device_type & WACOM_DEVICETYPE_WL_MONITOR)
2224 error = hid_hw_open(hdev); 2224 error = hid_hw_open(hdev);
2225 2225