]> www.infradead.org Git - users/willy/xarray.git/commit
HID: core: add helper for finding a field with a certain usage
authorKerem Karabay <kekrby@gmail.com>
Fri, 5 Jul 2024 11:17:42 +0000 (11:17 +0000)
committerJiri Kosina <jkosina@suse.com>
Fri, 2 Aug 2024 10:42:23 +0000 (12:42 +0200)
commit6edb8cd87cca5dd4389d4ea2d84b66ea94341bbd
tree80d6ee0630e7da4ee8ca454a0cb66046e69f21c4
parent6b5faec9f564ea627c66064a4a6a5904fe5a07dd
HID: core: add helper for finding a field with a certain usage

This helper will allow HID drivers to easily determine if they should
bind to a hid_device by checking for the prescence of a certain field
when its ID is not enough, which can be the case on USB devices with
multiple interfaces and/or configurations.

Convert google-hammer driver to use it, and remove now superfluous
hammer_has_usage().

[jkosina@suse.com: expand changelog with the information about
 google-hammer being added as user of this API ]
Signed-off-by: Kerem Karabay <kekrby@gmail.com>
Signed-off-by: Aditya Garg <gargaditya08@live.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
drivers/hid/hid-core.c
drivers/hid/hid-google-hammer.c
include/linux/hid.h