diff options
Diffstat (limited to 'drivers/hid/wacom_sys.c')
| -rw-r--r-- | drivers/hid/wacom_sys.c | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/drivers/hid/wacom_sys.c b/drivers/hid/wacom_sys.c index be8f7e2a026f..e2666ef84dc1 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; |
| @@ -2208,14 +2216,8 @@ static int wacom_parse_and_register(struct wacom *wacom, bool wireless) | |||
| 2208 | /* touch only Bamboo doesn't support pen */ | 2216 | /* touch only Bamboo doesn't support pen */ |
| 2209 | if ((features->type == BAMBOO_TOUCH) && | 2217 | if ((features->type == BAMBOO_TOUCH) && |
| 2210 | (features->device_type & WACOM_DEVICETYPE_PEN)) { | 2218 | (features->device_type & WACOM_DEVICETYPE_PEN)) { |
| 2211 | error = -ENODEV; | 2219 | cancel_delayed_work_sync(&wacom->init_work); |
| 2212 | goto fail_quirks; | 2220 | _wacom_query_tablet_data(wacom); |
| 2213 | } | ||
| 2214 | |||
| 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; | 2221 | error = -ENODEV; |
| 2220 | goto fail_quirks; | 2222 | goto fail_quirks; |
| 2221 | } | 2223 | } |
| @@ -2579,7 +2581,9 @@ static void wacom_remove(struct hid_device *hdev) | |||
| 2579 | 2581 | ||
| 2580 | /* make sure we don't trigger the LEDs */ | 2582 | /* make sure we don't trigger the LEDs */ |
| 2581 | wacom_led_groups_release(wacom); | 2583 | wacom_led_groups_release(wacom); |
| 2582 | wacom_release_resources(wacom); | 2584 | |
| 2585 | if (wacom->wacom_wac.features.type != REMOTE) | ||
| 2586 | wacom_release_resources(wacom); | ||
| 2583 | 2587 | ||
| 2584 | hid_set_drvdata(hdev, NULL); | 2588 | hid_set_drvdata(hdev, NULL); |
| 2585 | } | 2589 | } |
