Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

HID: dr: constify fixed up report descriptor

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-2-663b9210eb69@weissschuh.net
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>

authored by

Thomas Weißschuh and committed by
Benjamin Tissoires
49e00b5c 00f6f65b

+2 -2
+2 -2
drivers/hid/hid-dr.c
··· 199 199 #define PID0011_RDESC_ORIG_SIZE 101 200 200 201 201 /* Fixed report descriptor for PID 0x011 joystick */ 202 - static __u8 pid0011_rdesc_fixed[] = { 202 + static const __u8 pid0011_rdesc_fixed[] = { 203 203 0x05, 0x01, /* Usage Page (Desktop), */ 204 204 0x09, 0x04, /* Usage (Joystick), */ 205 205 0xA1, 0x01, /* Collection (Application), */ ··· 234 234 switch (hdev->product) { 235 235 case 0x0011: 236 236 if (*rsize == PID0011_RDESC_ORIG_SIZE) { 237 - rdesc = pid0011_rdesc_fixed; 238 237 *rsize = sizeof(pid0011_rdesc_fixed); 238 + return pid0011_rdesc_fixed; 239 239 } 240 240 break; 241 241 }