]> git.baikalelectronics.ru Git - kernel.git/commit
HID: asus: Only set EV_REP if we are adding a mapping
authorHans de Goede <hdegoede@redhat.com>
Tue, 28 Apr 2020 14:22:49 +0000 (16:22 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 11 Mar 2023 15:43:48 +0000 (16:43 +0100)
commit0a4ac384aaf0d9d1887e26bb5a718ecf89441e6b
tree19dbe39539f4f710b90957b3d9e7052195f40c09
parentea888c57b595cafa939f6b8aff62dc661bdaf14b
HID: asus: Only set EV_REP if we are adding a mapping

[ Upstream commit 2e3169974a343d7bb43498a0309d12eb27dde8fc ]

Make asus_input_mapping() only set EV_REP if we are adding a mapping.

The T100CHI bluetooth keyboard dock has a few input reports for which
we do not create any mappings (these input-reports are present in the
descriptors but never send).

The hid-asus code relies on the HID core not creating input devices for
input-reports without any mappings. But the present of the EV_REP but
counts as a mapping causing 6 /dev/input/event# nodes to be created for
the T100CHI bluetooth keyboard dock. This change brings the amount of
created /dev/input/event# nodes / input-devices down to 4.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Stable-dep-of: 4ab3a086d10e ("HID: asus: use spinlock to safely schedule workers")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/hid/hid-asus.c