HID: lenovo: Rework how the tp10ubkbd code decides which USB interface to use
authorHans de Goede <hdegoede@redhat.com>
Sun, 4 Apr 2021 08:04:31 +0000 (10:04 +0200)
committerJiri Kosina <jkosina@suse.cz>
Wed, 7 Apr 2021 10:48:19 +0000 (12:48 +0200)
commit2d0f1c071ab1ce2f75ac3e52b99775ce574f6416
treed6b91cc4f0b571cbaa0e84267ddd8be1655cebce
parente2da5ff435d64b59880648269c136484bea5c312
HID: lenovo: Rework how the tp10ubkbd code decides which USB interface to use

Instead of looking for a hdev with a type of HID_TYPE_USBMOUSE find
the interface for the mute/mic-mute/fn-lock LEDs by checking for the
output-report which is used to set them.

This is a preparation patch for adding support for the LEDs on the
X1 tablet thin keyboard which uses the same output-report, but has
a separate (third) USB interface for the touchpad/mouse functionality.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-lenovo.c