Skip to content

Commit 2e0e9cc

Browse files
author
Mel
committed
Add arg to set probe interface # for xppen pro init
1 parent 0edf31f commit 2e0e9cc

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

hid-uclogic-params.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1007,6 +1007,7 @@ static int uclogic_params_huion_init(struct uclogic_params *params,
10071007
* @params: Parameters to fill in (to be cleaned with
10081008
* uclogic_params_cleanup()). Not modified in case of error.
10091009
* Cannot be NULL.
1010+
* @interface: The device interface the control packet is sent to.
10101011
* @init_packet: Magic packet to send on usb to activate device.
10111012
* @packet_size: Size of the init packet.
10121013
* @rdesc_pen_arr: Pen report descriptor array.
@@ -1018,7 +1019,7 @@ static int uclogic_params_huion_init(struct uclogic_params *params,
10181019
* Zero, if successful. A negative errno code on error.
10191020
*/
10201021
static int uclogic_params_init_ugee_xppen_pro(struct hid_device *hdev,
1021-
struct uclogic_params *p,
1022+
struct uclogic_params *p, const uint8_t interface,
10221023
const u8 init_packet[], const size_t packet_size,
10231024
const u8 rdesc_pen_arr[], const size_t rdesc_pen_size,
10241025
const u8 rdesc_frame_arr[], const size_t rdesc_frame_size)
@@ -1035,7 +1036,7 @@ static int uclogic_params_init_ugee_xppen_pro(struct hid_device *hdev,
10351036

10361037
rc = usb_interrupt_msg(
10371038
udev,
1038-
usb_sndintpipe(udev, 0x03),
1039+
usb_sndintpipe(udev, interface),
10391040
buf,
10401041
packet_size,
10411042
&actual_len,
@@ -1435,7 +1436,7 @@ int uclogic_params_init(struct uclogic_params *params,
14351436
break;
14361437
}
14371438

1438-
rc = uclogic_params_init_ugee_xppen_pro(hdev, &p, init_packet, packet_size,
1439+
rc = uclogic_params_init_ugee_xppen_pro(hdev, &p, 0x03, init_packet, packet_size,
14391440
uclogic_rdesc_xppen_a156p_pen_arr,
14401441
uclogic_rdesc_xppen_a156p_pen_size,
14411442
uclogic_rdesc_xppen_a156p_frame_arr,

0 commit comments

Comments
 (0)