summaryrefslogtreecommitdiff
path: root/drivers/hid/wacom.h
diff options
context:
space:
mode:
authorBenjamin Tissoires <benjamin.tissoires@redhat.com>2016-07-13 18:05:52 +0200
committerJiri Kosina <jkosina@suse.cz>2016-08-05 13:39:13 +0200
commitd17d1f171158cc0663b072d91265cc8a6b477c77 (patch)
tree69de21a218bee75c43338f525e7ef7e66f2d84e7 /drivers/hid/wacom.h
parent85d2c77b78acf6c30d6d4f7263fb5d30fec1f5c3 (diff)
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.h')
-rw-r--r--drivers/hid/wacom.h21
1 files changed, 18 insertions, 3 deletions
diff --git a/drivers/hid/wacom.h b/drivers/hid/wacom.h
index 4681a65a4579..a968fbbbae77 100644
--- a/drivers/hid/wacom.h
+++ b/drivers/hid/wacom.h
@@ -105,13 +105,19 @@
#define USB_VENDOR_ID_WACOM 0x056a
#define USB_VENDOR_ID_LENOVO 0x17ef
+enum wacom_worker {
+ WACOM_WORKER_WIRELESS,
+ WACOM_WORKER_BATTERY,
+};
+
struct wacom {
struct usb_device *usbdev;
struct usb_interface *intf;
struct wacom_wac wacom_wac;
struct hid_device *hdev;
struct mutex lock;
- struct work_struct work;
+ struct work_struct wireless_work;
+ struct work_struct battery_work;
struct wacom_led {
u8 select[5]; /* status led selector (0..3) */
u8 llv; /* status led brightness no button (1..127) */
@@ -127,10 +133,19 @@ struct wacom {
struct attribute_group remote_group[5];
};
-static inline void wacom_schedule_work(struct wacom_wac *wacom_wac)
+static inline void wacom_schedule_work(struct wacom_wac *wacom_wac,
+ enum wacom_worker which)
{
struct wacom *wacom = container_of(wacom_wac, struct wacom, wacom_wac);
- schedule_work(&wacom->work);
+
+ switch (which) {
+ case WACOM_WORKER_WIRELESS:
+ schedule_work(&wacom->wireless_work);
+ break;
+ case WACOM_WORKER_BATTERY:
+ schedule_work(&wacom->battery_work);
+ break;
+ }
}
extern const struct hid_device_id wacom_ids[];