diff options
author | Benjamin Tissoires <benjamin.tissoires@redhat.com> | 2022-09-02 15:29:23 +0200 |
---|---|---|
committer | Benjamin Tissoires <benjamin.tissoires@redhat.com> | 2022-09-20 11:53:32 +0100 |
commit | 1e839143d674603b0bbbc4c513bca35404967dbc (patch) | |
tree | a01a1544efe8490a5d4c10d50a39a1d966afb268 /include/linux/hid.h | |
parent | eeeec27d68204701cc5d49d79f7ba811e8438109 (diff) | |
download | lwn-1e839143d674603b0bbbc4c513bca35404967dbc.tar.gz lwn-1e839143d674603b0bbbc4c513bca35404967dbc.zip |
HID: core: store the unique system identifier in hid_device
This unique identifier is currently used only for ensuring uniqueness in
sysfs. However, this could be handful for userspace to refer to a specific
hid_device by this id.
2 use cases are in my mind: LEDs (and their naming convention), and
HID-BPF.
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Link: https://lore.kernel.org/r/20220902132938.2409206-9-benjamin.tissoires@redhat.com
Diffstat (limited to 'include/linux/hid.h')
-rw-r--r-- | include/linux/hid.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/hid.h b/include/linux/hid.h index 4363a63b9775..a43dd17bc78f 100644 --- a/include/linux/hid.h +++ b/include/linux/hid.h @@ -658,6 +658,8 @@ struct hid_device { /* device report descriptor */ struct list_head debug_list; spinlock_t debug_list_lock; wait_queue_head_t debug_wait; + + unsigned int id; /* system unique id */ }; #define to_hid_device(pdev) \ |