diff options
author | Thomas Weißschuh <linux@weissschuh.net> | 2024-08-28 09:33:22 +0200 |
---|---|---|
committer | Benjamin Tissoires <bentiss@kernel.org> | 2024-09-05 16:20:56 +0200 |
commit | 3ce7edfa4f096a6e6c802bc3c6b04b1d691a2612 (patch) | |
tree | 66af172f2aa307e0df307f422ccb850545172acd /drivers/hid/hid-holtek-kbd.c | |
parent | HID: dr: constify fixed up report descriptor (diff) | |
download | linux-3ce7edfa4f096a6e6c802bc3c6b04b1d691a2612.tar.xz linux-3ce7edfa4f096a6e6c802bc3c6b04b1d691a2612.zip |
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>
Diffstat (limited to 'drivers/hid/hid-holtek-kbd.c')
-rw-r--r-- | drivers/hid/hid-holtek-kbd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/hid/hid-holtek-kbd.c b/drivers/hid/hid-holtek-kbd.c index 794d609c2e31..d13543517a6c 100644 --- a/drivers/hid/hid-holtek-kbd.c +++ b/drivers/hid/hid-holtek-kbd.c @@ -27,7 +27,7 @@ * to the boot interface. */ -static __u8 holtek_kbd_rdesc_fixed[] = { +static const __u8 holtek_kbd_rdesc_fixed[] = { /* Original report descriptor, with reduced number of consumer usages */ 0x05, 0x01, /* Usage Page (Desktop), */ 0x09, 0x80, /* Usage (Sys Control), */ @@ -108,8 +108,8 @@ static const __u8 *holtek_kbd_report_fixup(struct hid_device *hdev, __u8 *rdesc, struct usb_interface *intf = to_usb_interface(hdev->dev.parent); if (intf->cur_altsetting->desc.bInterfaceNumber == 1) { - rdesc = holtek_kbd_rdesc_fixed; *rsize = sizeof(holtek_kbd_rdesc_fixed); + return holtek_kbd_rdesc_fixed; } return rdesc; } |