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

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

authored by

Thomas Weißschuh and committed by
Benjamin Tissoires
00f6f65b c1f9eff7

+2 -2
+2 -2
drivers/hid/hid-bigbenff.c
··· 99 99 * - map previously unused analog trigger data to Z/RZ 100 100 * - simplify feature and output descriptor 101 101 */ 102 - static __u8 pid0902_rdesc_fixed[] = { 102 + static const __u8 pid0902_rdesc_fixed[] = { 103 103 0x05, 0x01, /* Usage Page (Generic Desktop Ctrls) */ 104 104 0x09, 0x05, /* Usage (Game Pad) */ 105 105 0xA1, 0x01, /* Collection (Application) */ ··· 468 468 unsigned int *rsize) 469 469 { 470 470 if (*rsize == PID0902_RDESC_ORIG_SIZE) { 471 - rdesc = pid0902_rdesc_fixed; 472 471 *rsize = sizeof(pid0902_rdesc_fixed); 472 + return pid0902_rdesc_fixed; 473 473 } else 474 474 hid_warn(hid, "unexpected rdesc, please submit for review\n"); 475 475 return rdesc;