]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
HID: let generic driver yield control iff specific driver has been enabled
authorJiri Kosina <jkosina@suse.cz>
Fri, 9 Jun 2017 11:15:37 +0000 (13:15 +0200)
committerJiri Kosina <jkosina@suse.cz>
Tue, 13 Jun 2017 14:52:50 +0000 (16:52 +0200)
commit0ca4cd7bccf0b82d2c10069f295772bb7b76d006
tree797ecf2d58b88761277af78fbcfb41e3ad8b5c57
parent6df62e7916befd2c04ac63180b4ddeae2f7639f2
HID: let generic driver yield control iff specific driver has been enabled

There are many situations where generic HID driver provides some basic level
of support for certain device, but later this support (usually by implementing
vendor-specific extensions of HID protocol) is extended and the support moved
over to a separate (usually per-vendor) specific driver.

This might bring a rather unpleasant suprise for users, as all of a sudden
there is a new config option they have to enable in order to get any support
for their device whatsoever, although previous kernel versions provided basic
support through the generic driver. Which is rightfully seen as a regression.

Fix this by including the entry for a particular device in
hid_have_special_driver[] iff the specific config option has been specified,
and let generic driver handle the device otherwise.
Also make the behavior of hid_scan_report() (where the same decision is being
taken on a per-report level) consistent.

While at it, reshuffle the hid_have_special_driver[] a bit to restore the
alphabetical ordering (first order by config option, and within those
sections order by VID).

This is considered a short-term solution, before generic way of giving
precedence to special drivers and falling back to generic driver is
figured out.

While at it, fixup a missing entry for GFRM driver; thanks to Hans de Geode for
spotting this (and for discovering a few issues in the conversion).

Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-core.c