diff options
Diffstat (limited to 'drivers/hid/wacom_sys.c')
-rw-r--r-- | drivers/hid/wacom_sys.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/hid/wacom_sys.c b/drivers/hid/wacom_sys.c index 62f3c899ab98..21ac2baa21be 100644 --- a/drivers/hid/wacom_sys.c +++ b/drivers/hid/wacom_sys.c | |||
@@ -1357,6 +1357,12 @@ static int wacom_probe(struct hid_device *hdev, | |||
1357 | mutex_init(&wacom->lock); | 1357 | mutex_init(&wacom->lock); |
1358 | INIT_WORK(&wacom->work, wacom_wireless_work); | 1358 | INIT_WORK(&wacom->work, wacom_wireless_work); |
1359 | 1359 | ||
1360 | if (!(features->quirks & WACOM_QUIRK_NO_INPUT)) { | ||
1361 | error = wacom_allocate_inputs(wacom); | ||
1362 | if (error) | ||
1363 | goto fail_allocate_inputs; | ||
1364 | } | ||
1365 | |||
1360 | /* set the default size in case we do not get them from hid */ | 1366 | /* set the default size in case we do not get them from hid */ |
1361 | wacom_set_default_phy(features); | 1367 | wacom_set_default_phy(features); |
1362 | 1368 | ||
@@ -1429,8 +1435,7 @@ static int wacom_probe(struct hid_device *hdev, | |||
1429 | } | 1435 | } |
1430 | 1436 | ||
1431 | if (!(features->quirks & WACOM_QUIRK_NO_INPUT)) { | 1437 | if (!(features->quirks & WACOM_QUIRK_NO_INPUT)) { |
1432 | error = wacom_allocate_inputs(wacom) || | 1438 | error = wacom_register_inputs(wacom); |
1433 | wacom_register_inputs(wacom); | ||
1434 | if (error) | 1439 | if (error) |
1435 | goto fail_register_inputs; | 1440 | goto fail_register_inputs; |
1436 | } | 1441 | } |
@@ -1464,7 +1469,6 @@ static int wacom_probe(struct hid_device *hdev, | |||
1464 | return 0; | 1469 | return 0; |
1465 | 1470 | ||
1466 | fail_hw_start: | 1471 | fail_hw_start: |
1467 | wacom_clean_inputs(wacom); | ||
1468 | if (hdev->bus == BUS_BLUETOOTH) | 1472 | if (hdev->bus == BUS_BLUETOOTH) |
1469 | device_remove_file(&hdev->dev, &dev_attr_speed); | 1473 | device_remove_file(&hdev->dev, &dev_attr_speed); |
1470 | fail_register_inputs: | 1474 | fail_register_inputs: |
@@ -1473,6 +1477,8 @@ fail_register_inputs: | |||
1473 | fail_battery: | 1477 | fail_battery: |
1474 | wacom_remove_shared_data(wacom_wac); | 1478 | wacom_remove_shared_data(wacom_wac); |
1475 | fail_shared_data: | 1479 | fail_shared_data: |
1480 | wacom_clean_inputs(wacom); | ||
1481 | fail_allocate_inputs: | ||
1476 | fail_type: | 1482 | fail_type: |
1477 | fail_pktlen: | 1483 | fail_pktlen: |
1478 | fail_parse: | 1484 | fail_parse: |