]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
HID: pidff: Fix set_device_control()
authorTomasz Pakuła <tomasz.pakula.oficjalny@gmail.com>
Tue, 25 Feb 2025 22:30:04 +0000 (23:30 +0100)
committerJiri Kosina <jkosina@suse.com>
Tue, 4 Mar 2025 20:42:44 +0000 (21:42 +0100)
commite2fa0bdf08a70623f24ed52f2037a330999d9800
treed6de4e4144a4201fd88ddc44a8c02a6b455100cc
parentf98ecedbeca34a8df1460c3a03cce32639c99a9d
HID: pidff: Fix set_device_control()

As the search for Device Control report is permissive, make sure the
desired field was actually found, before trying to set it.

Fix bitmask clearing as it was erronously using index instead of
index - 1 (HID arrays index is 1-based).

Add last two missing Device Control usages to the defined array.
PID_PAUSE and PID_CONTINUE.

Signed-off-by: Jiri Kosina <jkosina@suse.com>
drivers/hid/usbhid/hid-pidff.c