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

authored by

Thomas Weißschuh and committed by
Benjamin Tissoires
3ce7edfa 49e00b5c

+2 -2
+2 -2
drivers/hid/hid-holtek-kbd.c
··· 27 27 * to the boot interface. 28 28 */ 29 29 30 - static __u8 holtek_kbd_rdesc_fixed[] = { 30 + static const __u8 holtek_kbd_rdesc_fixed[] = { 31 31 /* Original report descriptor, with reduced number of consumer usages */ 32 32 0x05, 0x01, /* Usage Page (Desktop), */ 33 33 0x09, 0x80, /* Usage (Sys Control), */ ··· 108 108 struct usb_interface *intf = to_usb_interface(hdev->dev.parent); 109 109 110 110 if (intf->cur_altsetting->desc.bInterfaceNumber == 1) { 111 - rdesc = holtek_kbd_rdesc_fixed; 112 111 *rsize = sizeof(holtek_kbd_rdesc_fixed); 112 + return holtek_kbd_rdesc_fixed; 113 113 } 114 114 return rdesc; 115 115 }