]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
HID: core: remove the absolute need of hid_have_special_driver[]
authorBenjamin Tissoires <benjamin.tissoires@redhat.com>
Mon, 10 Feb 2020 03:46:00 +0000 (04:46 +0100)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Fri, 14 Feb 2020 13:14:34 +0000 (14:14 +0100)
commitb85bcf5950cb1e73de9854c2308439a98fda5428
treeb35ca361f3eec35556422393eeb0d5330b59eb7e
parent9d38ca57a8400ba25ad4b5c1f04e0e3da17aabd3
HID: core: remove the absolute need of hid_have_special_driver[]

BugLink: https://bugs.launchpad.net/bugs/1862567
Most HID devices behave properly when they are used with hid-generic.
Since kernel v4.12, we do not poll for input reports at plug in, so
hid-generic should behave properly with all HID devices.

There has been a long standing list of HID devices that have a special
driver. It used to be just a few, but with time, this list went too big,
and we can not ask users to know which HID special driver will pick up
their device.

We can teach hid-generic to be nice with others. If a device is not
explicitly marked with HID_QUIRK_HAVE_SPECIAL_DRIVER, we can allow
hid-generic to pick up the device as long as no other loaded HID driver
will match the device.

When the special driver appears, hid-generic can step back and let
the special driver handling the device. In case this special driver
is removed, this good old pal of hid-generic will rebind to the device.

This basically makes the list hid_have_special_driver[] useless. It
still allows to not see a hid-generic driver bound and removed during
boot, so we can keep it around.

This will also help other people to have a special HID driver without
the need of recompiling hid-core.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
(cherry picked from commit e04a0442d33b8cf183bba38646447b891bb02123)
Signed-off-by: Aaron Ma <aaron.ma@canonical.com>
Acked-by: Sultan Alsawaf <sultan.alsawaf@canonical.com>
Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
drivers/hid/hid-core.c
drivers/hid/hid-generic.c
include/linux/hid.h