]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
HID: maltron: constify fixed up report descriptor
authorThomas Weißschuh <linux@weissschuh.net>
Wed, 28 Aug 2024 07:33:24 +0000 (09:33 +0200)
committerBenjamin Tissoires <bentiss@kernel.org>
Thu, 5 Sep 2024 14:20:56 +0000 (16:20 +0200)
Now that the HID core can handle const report descriptors,
constify them where possible.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://patch.msgid.link/20240828-hid-const-fixup-2-v1-5-663b9210eb69@weissschuh.net
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
drivers/hid/hid-maltron.c

index 374c64dd82c2ceb2f8d31d614101521f275eff1c..f0aad1ba2e6d5745ca56c97e6ea037e7e71c01bf 100644 (file)
@@ -22,7 +22,7 @@
 #include "hid-ids.h"
 
 /* The original buggy USB descriptor */
-static u8 maltron_rdesc_o[] = {
+static const u8 maltron_rdesc_o[] = {
        0x05, 0x01,        /* Usage Page (Generic Desktop Ctrls) */
        0x09, 0x80,        /* Usage (Sys Control)                */
        0xA1, 0x01,        /* Collection (Application)           */
@@ -79,7 +79,7 @@ static u8 maltron_rdesc_o[] = {
 };
 
 /* The patched descriptor, allowing media key events to be accepted as valid */
-static u8 maltron_rdesc[] = {
+static const u8 maltron_rdesc[] = {
        0x05, 0x01,        /* Usage Page (Generic Desktop Ctrls) */
        0x09, 0x80,        /* Usage (Sys Control)                */
        0xA1, 0x01,        /* Collection (Application)           */