]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
HID: pidff: Fix needs_playback check
authorTomasz Pakuła <tomasz.pakula.oficjalny@gmail.com>
Mon, 3 Nov 2025 20:02:43 +0000 (21:02 +0100)
committerJiri Kosina <jkosina@suse.com>
Tue, 18 Nov 2025 17:04:28 +0000 (18:04 +0100)
commit9d7b89a1028230315a8999cfea7795fbe84f62cc
treed911a6feab6721274267e5acb936c7faeb82b95b
parent4e127a74786fa9573a32c8aa4bbf69ef78c3232a
HID: pidff: Fix needs_playback check

A small bug made it's way here when rewriting code to Linux quality.
Currently, if an effect is not infinite and a program requests it's
playback with the same number of loops, the play command won't be fired
and if an effect is infinite, the spam will continue.

We want every playback update for non-infinite effects and only some
for infinite (detecting when a program requests stop with 0 which will
be different than previous value which is usually 1 or 255).

Signed-off-by: Tomasz Pakuła <tomasz.pakula.oficjalny@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
drivers/hid/usbhid/hid-pidff.c