diff options
author | Benjamin Tissoires <benjamin.tissoires@redhat.com> | 2016-07-13 18:05:52 +0200 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2016-08-05 13:39:13 +0200 |
commit | d17d1f171158cc0663b072d91265cc8a6b477c77 (patch) | |
tree | 69de21a218bee75c43338f525e7ef7e66f2d84e7 /drivers/hid/wacom_sys.c | |
parent | 85d2c77b78acf6c30d6d4f7263fb5d30fec1f5c3 (diff) | |
download | lwn-d17d1f171158cc0663b072d91265cc8a6b477c77.tar.gz lwn-d17d1f171158cc0663b072d91265cc8a6b477c77.zip |
HID: wacom: use one work queue per task
Looks like the battery hijacked the wireless worker. That's not fair so
use a work queue per task.
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Acked-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/wacom_sys.c')
-rw-r--r-- | drivers/hid/wacom_sys.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/hid/wacom_sys.c b/drivers/hid/wacom_sys.c index af2801df14ed..54f026049812 100644 --- a/drivers/hid/wacom_sys.c +++ b/drivers/hid/wacom_sys.c @@ -1527,7 +1527,7 @@ static void wacom_calculate_res(struct wacom_features *features) void wacom_battery_work(struct work_struct *work) { - struct wacom *wacom = container_of(work, struct wacom, work); + struct wacom *wacom = container_of(work, struct wacom, battery_work); if ((wacom->wacom_wac.features.quirks & WACOM_QUIRK_BATTERY) && !wacom->battery) { @@ -1743,7 +1743,7 @@ fail_allocate_inputs: static void wacom_wireless_work(struct work_struct *work) { - struct wacom *wacom = container_of(work, struct wacom, work); + struct wacom *wacom = container_of(work, struct wacom, wireless_work); struct usb_device *usbdev = wacom->usbdev; struct wacom_wac *wacom_wac = &wacom->wacom_wac; struct hid_device *hdev1, *hdev2; @@ -1871,7 +1871,8 @@ static int wacom_probe(struct hid_device *hdev, wacom->usbdev = dev; wacom->intf = intf; mutex_init(&wacom->lock); - INIT_WORK(&wacom->work, wacom_wireless_work); + INIT_WORK(&wacom->wireless_work, wacom_wireless_work); + INIT_WORK(&wacom->battery_work, wacom_battery_work); /* ask for the report descriptor to be loaded by HID */ error = hid_parse(hdev); @@ -1912,7 +1913,8 @@ static void wacom_remove(struct hid_device *hdev) hid_hw_stop(hdev); - cancel_work_sync(&wacom->work); + cancel_work_sync(&wacom->wireless_work); + cancel_work_sync(&wacom->battery_work); kobject_put(wacom->remote_dir); wacom_destroy_leds(wacom); wacom_clean_inputs(wacom); |