diff options
author | Benjamin Tissoires <benjamin.tissoires@redhat.com> | 2016-07-13 18:06:02 +0200 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2016-08-05 13:39:16 +0200 |
commit | 83e6b40e2de6f8416ce6c8c3ca6c4bc8acfa8b32 (patch) | |
tree | 615def2263f412c2f4971a96b164b765e5921f7b /drivers/hid/wacom.h | |
parent | HID: wacom: EKR: add a worker to add/remove resources on addition/removal (diff) | |
download | linux-83e6b40e2de6f8416ce6c8c3ca6c4bc8acfa8b32.tar.xz linux-83e6b40e2de6f8416ce6c8c3ca6c4bc8acfa8b32.zip |
HID: wacom: EKR: have the wacom resources dynamically allocated
If we want to have one input device per remote, it's better to have our
own struct wacom_remote which is dynamically allocated.
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.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/hid/wacom.h b/drivers/hid/wacom.h index 1797e4b3662a..110ea6793b99 100644 --- a/drivers/hid/wacom.h +++ b/drivers/hid/wacom.h @@ -116,6 +116,14 @@ struct wacom_group_leds { u8 select; /* status led selector (0..3) */ }; +struct wacom_remote { + spinlock_t remote_lock; + struct kfifo remote_fifo; + struct kobject *remote_dir; + struct attribute_group remote_group[WACOM_MAX_REMOTES]; + __u32 serial[WACOM_MAX_REMOTES]; +}; + struct wacom { struct usb_device *usbdev; struct usb_interface *intf; @@ -125,8 +133,7 @@ struct wacom { 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_remote *remote; struct wacom_leds { struct wacom_group_leds *groups; u8 llv; /* status led brightness no button (1..127) */ @@ -137,8 +144,6 @@ struct wacom { struct power_supply *ac; struct power_supply_desc battery_desc; struct power_supply_desc ac_desc; - struct kobject *remote_dir; - struct attribute_group remote_group[5]; bool resources; }; |