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: cmedia: constify fixed up report descriptor

The HID core now allows static report descriptors to be read-only,
make use of it.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://patch.msgid.link/20240803-hid-const-fixup-v2-7-f53d7a7b29d8@weissschuh.net
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>

authored by

Thomas Weißschuh and committed by
Benjamin Tissoires
e6de161b fe73965d

+2 -2
+2 -2
drivers/hid/hid-cmedia.c
··· 26 26 /* Fixed report descriptor of HS-100B audio chip 27 27 * Bit 4 is an abolute Microphone mute usage instead of being unassigned. 28 28 */ 29 - static __u8 hs100b_rdesc_fixed[] = { 29 + static const __u8 hs100b_rdesc_fixed[] = { 30 30 0x05, 0x0C, /* Usage Page (Consumer), */ 31 31 0x09, 0x01, /* Usage (Consumer Control), */ 32 32 0xA1, 0x01, /* Collection (Application), */ ··· 204 204 { 205 205 if (*rsize == HS100B_RDESC_ORIG_SIZE) { 206 206 hid_info(hid, "Fixing CMedia HS-100B report descriptor\n"); 207 - rdesc = hs100b_rdesc_fixed; 208 207 *rsize = sizeof(hs100b_rdesc_fixed); 208 + return hs100b_rdesc_fixed; 209 209 } 210 210 return rdesc; 211 211 }