diff options
author | Jason Gerecke <killertofu@gmail.com> | 2015-08-03 10:17:05 -0700 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.com> | 2015-08-04 15:39:21 +0200 |
commit | 3f14a63a544374225c17221a5058748360428dc3 (patch) | |
tree | 5cc3c0ff459796c567c3120c68469a100caaf793 /drivers/hid/wacom_sys.c | |
parent | ccad85cc1ee34509840e5af80a436ceaf0b71edb (diff) |
HID: wacom: Remove WACOM_QUIRK_NO_INPUT
WACOM_QUIRK_NO_INPUT is a signal to the driver that input devices
should not be created for a particular device. This quirk was used by
the wireless receiver to prevent any devices from being created during
the initial probe (defering it instead until we got a tablet connection
event in 'wacom_wireless_work').
This quirk is not necessary now that a device_type is associated with each
device. Any input device allocated by 'wacom_allocate_inputs' which is
not necessary for a particular device is freed in 'wacom_register_inputs'.
In particular, none of the wireless receivers devices have the pen, pad,
or touch device types set so the same effect is achieved without the need
to be explicit.
We now return early in wacom_retrieve_hid_descriptor for wireless devices
(to prevent the device_type from being overridden) but since we ignore the
HID descriptor for the wireless reciever anyway, this is not an issue.
Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
Diffstat (limited to 'drivers/hid/wacom_sys.c')
-rw-r--r-- | drivers/hid/wacom_sys.c | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/drivers/hid/wacom_sys.c b/drivers/hid/wacom_sys.c index 13834bae227c..20d15c5fccec 100644 --- a/drivers/hid/wacom_sys.c +++ b/drivers/hid/wacom_sys.c @@ -453,11 +453,11 @@ static void wacom_retrieve_hid_descriptor(struct hid_device *hdev, * interface number. */ if (features->type == WIRELESS) { - if (intf->cur_altsetting->desc.bInterfaceNumber == 0) { + if (intf->cur_altsetting->desc.bInterfaceNumber == 0) features->device_type = WACOM_DEVICETYPE_WL_MONITOR; - } else if (intf->cur_altsetting->desc.bInterfaceNumber == 2) { - features->device_type |= WACOM_DEVICETYPE_TOUCH; - } + else + features->device_type = WACOM_DEVICETYPE_NONE; + return; } wacom_parse_hid(hdev, features); @@ -1531,11 +1531,9 @@ static int wacom_probe(struct hid_device *hdev, mutex_init(&wacom->lock); INIT_WORK(&wacom->work, wacom_wireless_work); - if (!(features->quirks & WACOM_QUIRK_NO_INPUT)) { - error = wacom_allocate_inputs(wacom); - if (error) - goto fail_allocate_inputs; - } + error = wacom_allocate_inputs(wacom); + if (error) + goto fail_allocate_inputs; /* * Bamboo Pad has a generic hid handling for the Pen, and we switch it @@ -1588,11 +1586,9 @@ static int wacom_probe(struct hid_device *hdev, goto fail_battery; } - if (!(features->quirks & WACOM_QUIRK_NO_INPUT)) { - error = wacom_register_inputs(wacom); - if (error) - goto fail_register_inputs; - } + error = wacom_register_inputs(wacom); + if (error) + goto fail_register_inputs; if (hdev->bus == BUS_BLUETOOTH) { error = device_create_file(&hdev->dev, &dev_attr_speed); |