Skip to content
/ linux Public
forked from torvalds/linux

Commit

Permalink
HID: viewsonic: constify fixed up report descriptor
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
t-8ch authored and Benjamin Tissoires committed Sep 5, 2024
1 parent 49cf20b commit 4f3ff3a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/hid/hid-viewsonic.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#define PD1011_RDESC_ORIG_SIZE 408

/* Fixed report descriptor of PD1011 signature pad */
static __u8 pd1011_rdesc_fixed[] = {
static const __u8 pd1011_rdesc_fixed[] = {
0x05, 0x0D, /* Usage Page (Digitizer), */
0x09, 0x01, /* Usage (Digitizer), */
0xA1, 0x01, /* Collection (Application), */
Expand Down Expand Up @@ -77,8 +77,8 @@ static const __u8 *viewsonic_report_fixup(struct hid_device *hdev, __u8 *rdesc,
case USB_DEVICE_ID_VIEWSONIC_PD1011:
case USB_DEVICE_ID_SIGNOTEC_VIEWSONIC_PD1011:
if (*rsize == PD1011_RDESC_ORIG_SIZE) {
rdesc = pd1011_rdesc_fixed;
*rsize = sizeof(pd1011_rdesc_fixed);
return pd1011_rdesc_fixed;
}
break;
}
Expand Down

0 comments on commit 4f3ff3a

Please sign in to comment.