Skip to content

Commit ffd01c3

Browse files
oneukumdtor
authored andcommitted
Input: aiptek - use HID headers
The driver uses its own definitions for HID requests. This leads to duplication and obfuscation. Use HID's definitions. Signed-off-by: Oliver Neukum <oneukum@suse.com> Link: https://patch.msgid.link/20260325143256.371854-1-oneukum@suse.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
1 parent 653f310 commit ffd01c3

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

drivers/input/tablet/aiptek.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@
5757
* http://aiptektablet.sourceforge.net.
5858
*/
5959

60+
#include <linux/hid.h>
6061
#include <linux/jiffies.h>
6162
#include <linux/kernel.h>
6263
#include <linux/slab.h>
@@ -164,8 +165,6 @@
164165

165166
#define USB_VENDOR_ID_AIPTEK 0x08ca
166167
#define USB_VENDOR_ID_KYE 0x0458
167-
#define USB_REQ_GET_REPORT 0x01
168-
#define USB_REQ_SET_REPORT 0x09
169168

170169
/* PointerMode codes
171170
*/
@@ -856,7 +855,7 @@ aiptek_set_report(struct aiptek *aiptek,
856855

857856
return usb_control_msg(udev,
858857
usb_sndctrlpipe(udev, 0),
859-
USB_REQ_SET_REPORT,
858+
HID_REQ_SET_REPORT,
860859
USB_TYPE_CLASS | USB_RECIP_INTERFACE |
861860
USB_DIR_OUT, (report_type << 8) + report_id,
862861
aiptek->ifnum, buffer, size, 5000);
@@ -871,7 +870,7 @@ aiptek_get_report(struct aiptek *aiptek,
871870

872871
return usb_control_msg(udev,
873872
usb_rcvctrlpipe(udev, 0),
874-
USB_REQ_GET_REPORT,
873+
HID_REQ_GET_REPORT,
875874
USB_TYPE_CLASS | USB_RECIP_INTERFACE |
876875
USB_DIR_IN, (report_type << 8) + report_id,
877876
aiptek->ifnum, buffer, size, 5000);

0 commit comments

Comments
 (0)