From e6f2813a6d3fd924a399f8b19bcd8b11487155bc Mon Sep 17 00:00:00 2001 From: Benjamin Tissoires Date: Wed, 13 Jul 2016 18:06:01 +0200 Subject: HID: wacom: EKR: add a worker to add/remove resources on addition/removal wacom_remote_status_irq() sends information of addition/removal of EKR. We want to allocate one input node per remote, so better having this in a separate worker, not handled in the IRQ directly. Signed-off-by: Benjamin Tissoires Acked-by: Ping Cheng Signed-off-by: Jiri Kosina --- drivers/hid/wacom.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'drivers/hid/wacom.h') diff --git a/drivers/hid/wacom.h b/drivers/hid/wacom.h index 8ac1eb8a4382..1797e4b3662a 100644 --- a/drivers/hid/wacom.h +++ b/drivers/hid/wacom.h @@ -90,6 +90,7 @@ #include #include #include +#include #include #include #include @@ -108,6 +109,7 @@ enum wacom_worker { WACOM_WORKER_WIRELESS, WACOM_WORKER_BATTERY, + WACOM_WORKER_REMOTE, }; struct wacom_group_leds { @@ -122,6 +124,9 @@ struct wacom { struct mutex lock; struct work_struct wireless_work; struct work_struct battery_work; + struct work_struct remote_work; + spinlock_t remote_lock; + struct kfifo remote_fifo; struct wacom_leds { struct wacom_group_leds *groups; u8 llv; /* status led brightness no button (1..127) */ @@ -149,6 +154,9 @@ static inline void wacom_schedule_work(struct wacom_wac *wacom_wac, case WACOM_WORKER_BATTERY: schedule_work(&wacom->battery_work); break; + case WACOM_WORKER_REMOTE: + schedule_work(&wacom->remote_work); + break; } } @@ -168,7 +176,4 @@ int wacom_wac_event(struct hid_device *hdev, struct hid_field *field, struct hid_usage *usage, __s32 value); void wacom_wac_report(struct hid_device *hdev, struct hid_report *report); void wacom_battery_work(struct work_struct *work); -int wacom_remote_create_attr_group(struct wacom *wacom, __u32 serial, - int index); -void wacom_remote_destroy_attr_group(struct wacom *wacom, __u32 serial); #endif -- cgit v1.2.3