]> git.baikalelectronics.ru Git - kernel.git/commit
HID: uclogic: Fix frame templates for big endian architectures
authorJosé Expósito <jose.exposito89@gmail.com>
Thu, 10 Nov 2022 17:49:18 +0000 (18:49 +0100)
committerJiri Kosina <jkosina@suse.cz>
Mon, 14 Nov 2022 14:02:38 +0000 (15:02 +0100)
commitcca92a07aed67c10bee5205ca4689c0b1668e0f0
treea2a1544de7293c7e7d06bc1462eef632cc313110
parent2e6efb2a69fdcc18c5e0810cfdf39aeb4ddf8c2c
HID: uclogic: Fix frame templates for big endian architectures

When parsing a frame template with a placeholder indicating the number
of buttons present on the frame its value was incorrectly set on big
endian architectures due to double little endian conversion.

In order to reproduce the issue and verify the fix, run the HID KUnit
tests on the PowerPC architecture:

  $ ./tools/testing/kunit/kunit.py run --kunitconfig=drivers/hid \
    --arch=powerpc --cross_compile=powerpc64-linux-gnu-

Fixes: ab5b832777e1 ("HID: uclogic: Allow to generate frame templates")
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-uclogic-rdesc.c