|
43 | 43 | #define SLIM_TABLET_5_8_INCH_RDESC_ORIG_SIZE 222 |
44 | 44 |
|
45 | 45 | /* Fixed Slim Tablet 5.8 inch descriptor */ |
46 | | -static __u8 slim_tablet_5_8_inch_rdesc_fixed[] = { |
| 46 | +static const __u8 slim_tablet_5_8_inch_rdesc_fixed[] = { |
47 | 47 | 0x05, 0x0D, /* Usage Page (Digitizer), */ |
48 | 48 | 0x09, 0x02, /* Usage (Pen), */ |
49 | 49 | 0xA1, 0x01, /* Collection (Application), */ |
@@ -94,7 +94,7 @@ static __u8 slim_tablet_5_8_inch_rdesc_fixed[] = { |
94 | 94 | #define SLIM_TABLET_12_1_INCH_RDESC_ORIG_SIZE 269 |
95 | 95 |
|
96 | 96 | /* Fixed Slim Tablet 12.1 inch descriptor */ |
97 | | -static __u8 slim_tablet_12_1_inch_rdesc_fixed[] = { |
| 97 | +static const __u8 slim_tablet_12_1_inch_rdesc_fixed[] = { |
98 | 98 | 0x05, 0x0D, /* Usage Page (Digitizer), */ |
99 | 99 | 0x09, 0x02, /* Usage (Pen), */ |
100 | 100 | 0xA1, 0x01, /* Collection (Application), */ |
@@ -145,7 +145,7 @@ static __u8 slim_tablet_12_1_inch_rdesc_fixed[] = { |
145 | 145 | #define Q_PAD_RDESC_ORIG_SIZE 241 |
146 | 146 |
|
147 | 147 | /* Fixed Q Pad descriptor */ |
148 | | -static __u8 q_pad_rdesc_fixed[] = { |
| 148 | +static const __u8 q_pad_rdesc_fixed[] = { |
149 | 149 | 0x05, 0x0D, /* Usage Page (Digitizer), */ |
150 | 150 | 0x09, 0x02, /* Usage (Pen), */ |
151 | 151 | 0xA1, 0x01, /* Collection (Application), */ |
@@ -198,7 +198,7 @@ static __u8 q_pad_rdesc_fixed[] = { |
198 | 198 | /* |
199 | 199 | * Fixed report descriptor for tablet with PID 0038. |
200 | 200 | */ |
201 | | -static __u8 pid_0038_rdesc_fixed[] = { |
| 201 | +static const __u8 pid_0038_rdesc_fixed[] = { |
202 | 202 | 0x05, 0x0D, /* Usage Page (Digitizer), */ |
203 | 203 | 0x09, 0x02, /* Usage (Pen), */ |
204 | 204 | 0xA1, 0x01, /* Collection (Application), */ |
@@ -249,7 +249,7 @@ static __u8 pid_0038_rdesc_fixed[] = { |
249 | 249 | #define MEDIA_TABLET_10_6_INCH_RDESC_ORIG_SIZE 300 |
250 | 250 |
|
251 | 251 | /* Fixed Media Tablet 10.6 inch descriptor */ |
252 | | -static __u8 media_tablet_10_6_inch_rdesc_fixed[] = { |
| 252 | +static const __u8 media_tablet_10_6_inch_rdesc_fixed[] = { |
253 | 253 | 0x05, 0x0D, /* Usage Page (Digitizer), */ |
254 | 254 | 0x09, 0x02, /* Usage (Pen), */ |
255 | 255 | 0xA1, 0x01, /* Collection (Application), */ |
@@ -362,7 +362,7 @@ static __u8 media_tablet_10_6_inch_rdesc_fixed[] = { |
362 | 362 | #define MEDIA_TABLET_14_1_INCH_RDESC_ORIG_SIZE 309 |
363 | 363 |
|
364 | 364 | /* Fixed Media Tablet 14.1 inch descriptor */ |
365 | | -static __u8 media_tablet_14_1_inch_rdesc_fixed[] = { |
| 365 | +static const __u8 media_tablet_14_1_inch_rdesc_fixed[] = { |
366 | 366 | 0x05, 0x0D, /* Usage Page (Digitizer), */ |
367 | 367 | 0x09, 0x02, /* Usage (Pen), */ |
368 | 368 | 0xA1, 0x01, /* Collection (Application), */ |
@@ -473,7 +473,7 @@ static __u8 media_tablet_14_1_inch_rdesc_fixed[] = { |
473 | 473 | #define SIRIUS_BATTERY_FREE_TABLET_RDESC_ORIG_SIZE 335 |
474 | 474 |
|
475 | 475 | /* Fixed Sirius Battery Free Tablet descriptor */ |
476 | | -static __u8 sirius_battery_free_tablet_rdesc_fixed[] = { |
| 476 | +static const __u8 sirius_battery_free_tablet_rdesc_fixed[] = { |
477 | 477 | 0x05, 0x0D, /* Usage Page (Digitizer), */ |
478 | 478 | 0x09, 0x02, /* Usage (Pen), */ |
479 | 479 | 0xA1, 0x01, /* Collection (Application), */ |
@@ -605,44 +605,44 @@ static const __u8 *waltop_report_fixup(struct hid_device *hdev, __u8 *rdesc, |
605 | 605 | switch (hdev->product) { |
606 | 606 | case USB_DEVICE_ID_WALTOP_SLIM_TABLET_5_8_INCH: |
607 | 607 | if (*rsize == SLIM_TABLET_5_8_INCH_RDESC_ORIG_SIZE) { |
608 | | - rdesc = slim_tablet_5_8_inch_rdesc_fixed; |
609 | 608 | *rsize = sizeof(slim_tablet_5_8_inch_rdesc_fixed); |
| 609 | + return slim_tablet_5_8_inch_rdesc_fixed; |
610 | 610 | } |
611 | 611 | break; |
612 | 612 | case USB_DEVICE_ID_WALTOP_SLIM_TABLET_12_1_INCH: |
613 | 613 | if (*rsize == SLIM_TABLET_12_1_INCH_RDESC_ORIG_SIZE) { |
614 | | - rdesc = slim_tablet_12_1_inch_rdesc_fixed; |
615 | 614 | *rsize = sizeof(slim_tablet_12_1_inch_rdesc_fixed); |
| 615 | + return slim_tablet_12_1_inch_rdesc_fixed; |
616 | 616 | } |
617 | 617 | break; |
618 | 618 | case USB_DEVICE_ID_WALTOP_Q_PAD: |
619 | 619 | if (*rsize == Q_PAD_RDESC_ORIG_SIZE) { |
620 | | - rdesc = q_pad_rdesc_fixed; |
621 | 620 | *rsize = sizeof(q_pad_rdesc_fixed); |
| 621 | + return q_pad_rdesc_fixed; |
622 | 622 | } |
623 | 623 | break; |
624 | 624 | case USB_DEVICE_ID_WALTOP_PID_0038: |
625 | 625 | if (*rsize == PID_0038_RDESC_ORIG_SIZE) { |
626 | | - rdesc = pid_0038_rdesc_fixed; |
627 | 626 | *rsize = sizeof(pid_0038_rdesc_fixed); |
| 627 | + return pid_0038_rdesc_fixed; |
628 | 628 | } |
629 | 629 | break; |
630 | 630 | case USB_DEVICE_ID_WALTOP_MEDIA_TABLET_10_6_INCH: |
631 | 631 | if (*rsize == MEDIA_TABLET_10_6_INCH_RDESC_ORIG_SIZE) { |
632 | | - rdesc = media_tablet_10_6_inch_rdesc_fixed; |
633 | 632 | *rsize = sizeof(media_tablet_10_6_inch_rdesc_fixed); |
| 633 | + return media_tablet_10_6_inch_rdesc_fixed; |
634 | 634 | } |
635 | 635 | break; |
636 | 636 | case USB_DEVICE_ID_WALTOP_MEDIA_TABLET_14_1_INCH: |
637 | 637 | if (*rsize == MEDIA_TABLET_14_1_INCH_RDESC_ORIG_SIZE) { |
638 | | - rdesc = media_tablet_14_1_inch_rdesc_fixed; |
639 | 638 | *rsize = sizeof(media_tablet_14_1_inch_rdesc_fixed); |
| 639 | + return media_tablet_14_1_inch_rdesc_fixed; |
640 | 640 | } |
641 | 641 | break; |
642 | 642 | case USB_DEVICE_ID_WALTOP_SIRIUS_BATTERY_FREE_TABLET: |
643 | 643 | if (*rsize == SIRIUS_BATTERY_FREE_TABLET_RDESC_ORIG_SIZE) { |
644 | | - rdesc = sirius_battery_free_tablet_rdesc_fixed; |
645 | 644 | *rsize = sizeof(sirius_battery_free_tablet_rdesc_fixed); |
| 645 | + return sirius_battery_free_tablet_rdesc_fixed; |
646 | 646 | } |
647 | 647 | break; |
648 | 648 | } |
|
0 commit comments