]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
HID: pidff: Rework pidff_upload_effect
authorTomasz Pakuła <tomasz.pakula.oficjalny@gmail.com>
Wed, 13 Aug 2025 20:09:58 +0000 (22:09 +0200)
committerJiri Kosina <jkosina@suse.com>
Fri, 15 Aug 2025 13:58:09 +0000 (15:58 +0200)
commit7fbaa031b94182a9c9e58310935a2f74265ef78d
treec8a856b8faf9b5069dca1f820421e700486365a3
parent1abfcd86e38c3466acefd0069bf6b3c2514fb886
HID: pidff: Rework pidff_upload_effect

One of the more complicated functions. Expunge some of the logic to
separate functions (FF -> PID id conversion)

Add a macro for envelope check to make it more readable in the upload
function.

All this made it possible to to expunge common code from the big switch
statement and reduce the overall function size considerably. Now it can
fit on one screen.

Move the effect_cout logic from report functions to upload/erase
functions.

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