]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
HID: uclogic: make read-only array reconnect_event static const
authorColin Ian King <colin.i.king@gmail.com>
Thu, 19 Jun 2025 08:34:56 +0000 (09:34 +0100)
committerJiri Kosina <jkosina@suse.com>
Fri, 20 Jun 2025 07:05:47 +0000 (09:05 +0200)
Don't populate the read-only array reconnect_event on the stack
at run time, instead make it static const.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
drivers/hid/hid-uclogic-params.c

index a6044996abf2353bed23a666ce8beb55bed4b13c..b3d56057cec94cfa9843ede3648888d8f77a89f2 100644 (file)
@@ -1341,7 +1341,7 @@ static int uclogic_params_ugee_v2_init_event_hooks(struct hid_device *hdev,
                                                   struct uclogic_params *p)
 {
        struct uclogic_raw_event_hook *event_hook;
-       __u8 reconnect_event[] = {
+       static const __u8 reconnect_event[] = {
                /* Event received on wireless tablet reconnection */
                0x02, 0xF8, 0x02, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
        };