Skip to content

Commit 4f3ff3a

Browse files
t-8chBenjamin Tissoires
authored andcommitted
HID: viewsonic: 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 49cf20b commit 4f3ff3a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/hid/hid-viewsonic.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#define PD1011_RDESC_ORIG_SIZE 408
2323

2424
/* Fixed report descriptor of PD1011 signature pad */
25-
static __u8 pd1011_rdesc_fixed[] = {
25+
static const __u8 pd1011_rdesc_fixed[] = {
2626
0x05, 0x0D, /* Usage Page (Digitizer), */
2727
0x09, 0x01, /* Usage (Digitizer), */
2828
0xA1, 0x01, /* Collection (Application), */
@@ -77,8 +77,8 @@ static const __u8 *viewsonic_report_fixup(struct hid_device *hdev, __u8 *rdesc,
7777
case USB_DEVICE_ID_VIEWSONIC_PD1011:
7878
case USB_DEVICE_ID_SIGNOTEC_VIEWSONIC_PD1011:
7979
if (*rsize == PD1011_RDESC_ORIG_SIZE) {
80-
rdesc = pd1011_rdesc_fixed;
8180
*rsize = sizeof(pd1011_rdesc_fixed);
81+
return pd1011_rdesc_fixed;
8282
}
8383
break;
8484
}

0 commit comments

Comments
 (0)