Skip to content

Commit b299944

Browse files
t-8chBenjamin Tissoires
authored andcommitted
HID: keytouch: 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 3ce7edf commit b299944

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

drivers/hid/hid-keytouch.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
/* Replace the broken report descriptor of this device with rather
1818
* a default one */
19-
static __u8 keytouch_fixed_rdesc[] = {
19+
static const __u8 keytouch_fixed_rdesc[] = {
2020
0x05, 0x01, 0x09, 0x06, 0xa1, 0x01, 0x05, 0x07, 0x19, 0xe0, 0x29, 0xe7, 0x15,
2121
0x00, 0x25, 0x01, 0x75, 0x01, 0x95, 0x08, 0x81, 0x02, 0x95, 0x01, 0x75, 0x08,
2222
0x81, 0x01, 0x95, 0x03, 0x75, 0x01, 0x05, 0x08, 0x19, 0x01, 0x29, 0x03, 0x91,
@@ -29,10 +29,8 @@ static const __u8 *keytouch_report_fixup(struct hid_device *hdev, __u8 *rdesc,
2929
{
3030
hid_info(hdev, "fixing up Keytouch IEC report descriptor\n");
3131

32-
rdesc = keytouch_fixed_rdesc;
3332
*rsize = sizeof(keytouch_fixed_rdesc);
34-
35-
return rdesc;
33+
return keytouch_fixed_rdesc;
3634
}
3735

3836
static const struct hid_device_id keytouch_devices[] = {

0 commit comments

Comments
 (0)