Skip to content

Commit 6d16f15

Browse files
committed
uclogic: Rename original rdesc sizes to match fixed
1 parent 88b2056 commit 6d16f15

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

hid-uclogic.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -361,9 +361,9 @@ static const size_t uclogic_rdesc_pf1209_fixed_size =
361361
sizeof(uclogic_rdesc_pf1209_fixed_arr);
362362

363363
/* Size of the original descriptors of TWHL850 tablet */
364-
#define UCLOGIC_RDESC_TWHL850_ORIG_SIZE0 182
365-
#define UCLOGIC_RDESC_TWHL850_ORIG_SIZE1 161
366-
#define UCLOGIC_RDESC_TWHL850_ORIG_SIZE2 92
364+
#define UCLOGIC_RDESC_TWHL850_ORIG0_SIZE 182
365+
#define UCLOGIC_RDESC_TWHL850_ORIG1_SIZE 161
366+
#define UCLOGIC_RDESC_TWHL850_ORIG2_SIZE 92
367367

368368
/* Fixed PID 0522 tablet report descriptor, interface 0 (stylus) */
369369
static __u8 uclogic_rdesc_twhl850_fixed0_arr[] = {
@@ -478,8 +478,8 @@ static const size_t uclogic_rdesc_twhl850_fixed2_size =
478478
sizeof(uclogic_rdesc_twhl850_fixed2_arr);
479479

480480
/* Size of the original descriptors of TWHA60 tablet */
481-
#define UCLOGIC_RDESC_TWHA60_ORIG_SIZE0 254
482-
#define UCLOGIC_RDESC_TWHA60_ORIG_SIZE1 139
481+
#define UCLOGIC_RDESC_TWHA60_ORIG0_SIZE 254
482+
#define UCLOGIC_RDESC_TWHA60_ORIG1_SIZE 139
483483

484484
/* Fixed TWHA60 report descriptor, interface 0 (stylus) */
485485
static __u8 uclogic_rdesc_twha60_fixed0_arr[] = {
@@ -831,19 +831,19 @@ static __u8 *uclogic_report_fixup(struct hid_device *hdev, __u8 *rdesc,
831831
case USB_DEVICE_ID_UCLOGIC_WIRELESS_TABLET_TWHL850:
832832
switch (iface_num) {
833833
case 0:
834-
if (*rsize == UCLOGIC_RDESC_TWHL850_ORIG_SIZE0) {
834+
if (*rsize == UCLOGIC_RDESC_TWHL850_ORIG0_SIZE) {
835835
rdesc = uclogic_rdesc_twhl850_fixed0_arr;
836836
*rsize = uclogic_rdesc_twhl850_fixed0_size;
837837
}
838838
break;
839839
case 1:
840-
if (*rsize == UCLOGIC_RDESC_TWHL850_ORIG_SIZE1) {
840+
if (*rsize == UCLOGIC_RDESC_TWHL850_ORIG1_SIZE) {
841841
rdesc = uclogic_rdesc_twhl850_fixed1_arr;
842842
*rsize = uclogic_rdesc_twhl850_fixed1_size;
843843
}
844844
break;
845845
case 2:
846-
if (*rsize == UCLOGIC_RDESC_TWHL850_ORIG_SIZE2) {
846+
if (*rsize == UCLOGIC_RDESC_TWHL850_ORIG2_SIZE) {
847847
rdesc = uclogic_rdesc_twhl850_fixed2_arr;
848848
*rsize = uclogic_rdesc_twhl850_fixed2_size;
849849
}
@@ -853,13 +853,13 @@ static __u8 *uclogic_report_fixup(struct hid_device *hdev, __u8 *rdesc,
853853
case USB_DEVICE_ID_UCLOGIC_TABLET_TWHA60:
854854
switch (iface_num) {
855855
case 0:
856-
if (*rsize == UCLOGIC_RDESC_TWHA60_ORIG_SIZE0) {
856+
if (*rsize == UCLOGIC_RDESC_TWHA60_ORIG0_SIZE) {
857857
rdesc = uclogic_rdesc_twha60_fixed0_arr;
858858
*rsize = uclogic_rdesc_twha60_fixed0_size;
859859
}
860860
break;
861861
case 1:
862-
if (*rsize == UCLOGIC_RDESC_TWHA60_ORIG_SIZE1) {
862+
if (*rsize == UCLOGIC_RDESC_TWHA60_ORIG1_SIZE) {
863863
rdesc = uclogic_rdesc_twha60_fixed1_arr;
864864
*rsize = uclogic_rdesc_twha60_fixed1_size;
865865
}

0 commit comments

Comments
 (0)