File tree Expand file tree Collapse file tree 1 file changed +13
-9
lines changed
Expand file tree Collapse file tree 1 file changed +13
-9
lines changed Original file line number Diff line number Diff line change @@ -1036,17 +1036,21 @@ static int uclogic_probe(struct hid_device *hdev,
10361036 break ;
10371037 case USB_DEVICE_ID_UCLOGIC_TABLET_TWHA60 :
10381038 /*
1039- * If it is the pen interface of the three-interface version,
1040- * which is known to respond to initialization.
1039+ * If it is the three-interface version, which is known to
1040+ * respond to initialization.
10411041 */
1042- if (udev -> config -> desc .bNumInterfaces == 3 &&
1043- intf -> cur_altsetting -> desc .bInterfaceNumber == 0 ) {
1044- rc = uclogic_tablet_enable (hdev );
1045- if (rc ) {
1046- hid_err (hdev , "tablet enabling failed\n" );
1047- return rc ;
1042+ if (udev -> config -> desc .bNumInterfaces == 3 ) {
1043+ /* If it is the pen interface */
1044+ if (intf -> cur_altsetting -> desc .bInterfaceNumber == 0 ) {
1045+ rc = uclogic_tablet_enable (hdev );
1046+ if (rc ) {
1047+ hid_err (hdev , "tablet enabling failed\n" );
1048+ return rc ;
1049+ }
1050+ drvdata -> invert_pen_inrange = true;
1051+ } else {
1052+ drvdata -> ignore_pen_usage = true;
10481053 }
1049- drvdata -> invert_pen_inrange = true;
10501054 }
10511055 break ;
10521056 }
You can’t perform that action at this time.
0 commit comments