summaryrefslogtreecommitdiff
path: root/drivers/input/tablet
diff options
context:
space:
mode:
authorOliver Neukum <oneukum@suse.com>2026-03-25 15:32:46 +0100
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2026-03-25 09:09:51 -0700
commitffd01c3bcc1af4d8c3e7949152af0d9fe3d1fda5 (patch)
treef1d50bbc7c3bf9798462c125be4deb8a747212de /drivers/input/tablet
parent653f3100f551cf01974a18cce66e368f248ee48a (diff)
downloadlwn-ffd01c3bcc1af4d8c3e7949152af0d9fe3d1fda5.tar.gz
lwn-ffd01c3bcc1af4d8c3e7949152af0d9fe3d1fda5.zip
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>
Diffstat (limited to 'drivers/input/tablet')
-rw-r--r--drivers/input/tablet/aiptek.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/input/tablet/aiptek.c b/drivers/input/tablet/aiptek.c
index 6df24cee3c9d..1ad3c19aa155 100644
--- a/drivers/input/tablet/aiptek.c
+++ b/drivers/input/tablet/aiptek.c
@@ -57,6 +57,7 @@
* http://aiptektablet.sourceforge.net.
*/
+#include <linux/hid.h>
#include <linux/jiffies.h>
#include <linux/kernel.h>
#include <linux/slab.h>
@@ -164,8 +165,6 @@
#define USB_VENDOR_ID_AIPTEK 0x08ca
#define USB_VENDOR_ID_KYE 0x0458
-#define USB_REQ_GET_REPORT 0x01
-#define USB_REQ_SET_REPORT 0x09
/* PointerMode codes
*/
@@ -856,7 +855,7 @@ aiptek_set_report(struct aiptek *aiptek,
return usb_control_msg(udev,
usb_sndctrlpipe(udev, 0),
- USB_REQ_SET_REPORT,
+ HID_REQ_SET_REPORT,
USB_TYPE_CLASS | USB_RECIP_INTERFACE |
USB_DIR_OUT, (report_type << 8) + report_id,
aiptek->ifnum, buffer, size, 5000);
@@ -871,7 +870,7 @@ aiptek_get_report(struct aiptek *aiptek,
return usb_control_msg(udev,
usb_rcvctrlpipe(udev, 0),
- USB_REQ_GET_REPORT,
+ HID_REQ_GET_REPORT,
USB_TYPE_CLASS | USB_RECIP_INTERFACE |
USB_DIR_IN, (report_type << 8) + report_id,
aiptek->ifnum, buffer, size, 5000);