Skip to content

Commit 3ce7edf

Browse files
t-8chBenjamin Tissoires
authored andcommitted
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 <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Benjamin Tissoires <[email protected]>
1 parent 49e00b5 commit 3ce7edf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/hid/hid-holtek-kbd.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
* to the boot interface.
2828
*/
2929

30-
static __u8 holtek_kbd_rdesc_fixed[] = {
30+
static const __u8 holtek_kbd_rdesc_fixed[] = {
3131
/* Original report descriptor, with reduced number of consumer usages */
3232
0x05, 0x01, /* Usage Page (Desktop), */
3333
0x09, 0x80, /* Usage (Sys Control), */
@@ -108,8 +108,8 @@ static const __u8 *holtek_kbd_report_fixup(struct hid_device *hdev, __u8 *rdesc,
108108
struct usb_interface *intf = to_usb_interface(hdev->dev.parent);
109109

110110
if (intf->cur_altsetting->desc.bInterfaceNumber == 1) {
111-
rdesc = holtek_kbd_rdesc_fixed;
112111
*rsize = sizeof(holtek_kbd_rdesc_fixed);
112+
return holtek_kbd_rdesc_fixed;
113113
}
114114
return rdesc;
115115
}

0 commit comments

Comments
 (0)