diff options
author | Jiri Kosina <jkosina@suse.cz> | 2017-02-22 01:13:52 +0100 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2017-02-22 01:13:52 +0100 |
commit | 2fa299a917adb2db2d486b9e4a3072865ce70a03 (patch) | |
tree | f05b53af973fcec9994707d2d44abf8abb6545c1 /drivers/hid | |
parent | 27a67e0f983567574ef659520d930f82cf65125a (diff) | |
download | linux-2fa299a917adb2db2d486b9e4a3072865ce70a03.tar.gz linux-2fa299a917adb2db2d486b9e4a3072865ce70a03.tar.bz2 linux-2fa299a917adb2db2d486b9e4a3072865ce70a03.zip |
HID: rmi: fallback to generic/multitouch if hid-rmi is not built
Commit 279967a65b32 ("HID: rmi: Handle all Synaptics touchpads using hid-rmi")
unconditionally switches over handling of all Synaptics touchpads to hid-rmi
(to make use of extended features of the HW); in case CONFIG_HID_RMI is
disabled though this renders the touchpad unusable, as the
HID_DEVICE(HID_BUS_ANY, HID_GROUP_RMI, HID_ANY_ID, HID_ANY_ID)
match doesn't exist and generic/multitouch doesn't bind to it either (due
to hid group mismatch).
Fix this by switching over to hid-rmi only if it has been actually built.
Fixes: 279967a65b32 ("HID: rmi: Handle all Synaptics touchpads using hid-rmi")
Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Acked-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Tested-by: Andrew Duggan <aduggan@synaptics.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid')
-rw-r--r-- | drivers/hid/hid-core.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index 538ff697a4cf..e9e87d337446 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c @@ -827,7 +827,8 @@ static int hid_scan_report(struct hid_device *hid) * hid-rmi should take care of them, * not hid-generic */ - hid->group = HID_GROUP_RMI; + if (IS_ENABLED(CONFIG_HID_RMI)) + hid->group = HID_GROUP_RMI; break; } |