diff options
| author | Takashi Iwai <tiwai@suse.de> | 2017-01-25 22:11:17 +0100 |
|---|---|---|
| committer | Takashi Iwai <tiwai@suse.de> | 2017-01-25 22:11:17 +0100 |
| commit | e1a063f43a5e0435ecf8a2b6d42e10e20e8caf61 (patch) | |
| tree | 7329fb15e57917a503c859f7266fcd034728bd54 /drivers/hid/wacom_sys.c | |
| parent | 9eb5d0e635ebe2f227d591e531d48c6f01c0dd78 (diff) | |
| parent | 0369d6315bc2bc56da2a2b15c8074b889096a47e (diff) | |
Merge branch 'topic/intel-lpe-audio' into for-next
Diffstat (limited to 'drivers/hid/wacom_sys.c')
| -rw-r--r-- | drivers/hid/wacom_sys.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/hid/wacom_sys.c b/drivers/hid/wacom_sys.c index b9779bcbd140..8aeca038cc73 100644 --- a/drivers/hid/wacom_sys.c +++ b/drivers/hid/wacom_sys.c @@ -740,6 +740,11 @@ static int wacom_add_shared_data(struct hid_device *hdev) return retval; } + if (wacom_wac->features.device_type & WACOM_DEVICETYPE_TOUCH) + wacom_wac->shared->touch = hdev; + else if (wacom_wac->features.device_type & WACOM_DEVICETYPE_PEN) + wacom_wac->shared->pen = hdev; + out: mutex_unlock(&wacom_udev_list_lock); return retval; @@ -2036,10 +2041,6 @@ static int wacom_parse_and_register(struct wacom *wacom, bool wireless) if (error) goto fail; - error = wacom_add_shared_data(hdev); - if (error) - goto fail; - /* * Bamboo Pad has a generic hid handling for the Pen, and we switch it * into debug mode for the touch part. @@ -2080,10 +2081,9 @@ static int wacom_parse_and_register(struct wacom *wacom, bool wireless) wacom_update_name(wacom, wireless ? " (WL)" : ""); - if (wacom_wac->features.device_type & WACOM_DEVICETYPE_TOUCH) - wacom_wac->shared->touch = hdev; - else if (wacom_wac->features.device_type & WACOM_DEVICETYPE_PEN) - wacom_wac->shared->pen = hdev; + error = wacom_add_shared_data(hdev); + if (error) + goto fail; if (!(features->device_type & WACOM_DEVICETYPE_WL_MONITOR) && (features->quirks & WACOM_QUIRK_BATTERY)) { |
