* [PATCH 1/2] input: aiptek: use HID headers
@ 2026-03-25 14:32 Oliver Neukum
2026-03-25 14:32 ` [PATCH 2/2] input: pegasus_notetaker: use HID defines Oliver Neukum
2026-03-25 16:10 ` [PATCH 1/2] input: aiptek: use HID headers Dmitry Torokhov
0 siblings, 2 replies; 4+ messages in thread
From: Oliver Neukum @ 2026-03-25 14:32 UTC (permalink / raw)
To: dmitry.torokhov, kees, linux-input; +Cc: Oliver Neukum
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>
---
drivers/input/tablet/aiptek.c | 7 +++----
1 file 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);
--
2.53.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] input: pegasus_notetaker: use HID defines
2026-03-25 14:32 [PATCH 1/2] input: aiptek: use HID headers Oliver Neukum
@ 2026-03-25 14:32 ` Oliver Neukum
2026-03-25 16:10 ` Dmitry Torokhov
2026-03-25 16:10 ` [PATCH 1/2] input: aiptek: use HID headers Dmitry Torokhov
1 sibling, 1 reply; 4+ messages in thread
From: Oliver Neukum @ 2026-03-25 14:32 UTC (permalink / raw)
To: dmitry.torokhov, kees, linux-input; +Cc: Oliver Neukum
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>
---
drivers/input/tablet/pegasus_notetaker.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/input/tablet/pegasus_notetaker.c b/drivers/input/tablet/pegasus_notetaker.c
index 3a8493ed5e44..6415bfe1886e 100644
--- a/drivers/input/tablet/pegasus_notetaker.c
+++ b/drivers/input/tablet/pegasus_notetaker.c
@@ -36,6 +36,7 @@
* T Tip
*/
+#include <linux/hid.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/input.h>
@@ -44,10 +45,6 @@
#include <linux/workqueue.h>
#include <linux/mutex.h>
-/* USB HID defines */
-#define USB_REQ_GET_REPORT 0x01
-#define USB_REQ_SET_REPORT 0x09
-
#define USB_VENDOR_ID_PEGASUSTECH 0x0e20
#define USB_DEVICE_ID_PEGASUS_NOTETAKER_EN100 0x0101
@@ -108,7 +105,7 @@ static int pegasus_control_msg(struct pegasus *pegasus, u8 *data, int len)
result = usb_control_msg(pegasus->usbdev,
usb_sndctrlpipe(pegasus->usbdev, 0),
- USB_REQ_SET_REPORT,
+ HID_REQ_SET_REPORT,
USB_TYPE_VENDOR | USB_DIR_OUT,
0, 0, cmd_buf, sizeof_buf,
USB_CTRL_SET_TIMEOUT);
--
2.53.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] input: aiptek: use HID headers
2026-03-25 14:32 [PATCH 1/2] input: aiptek: use HID headers Oliver Neukum
2026-03-25 14:32 ` [PATCH 2/2] input: pegasus_notetaker: use HID defines Oliver Neukum
@ 2026-03-25 16:10 ` Dmitry Torokhov
1 sibling, 0 replies; 4+ messages in thread
From: Dmitry Torokhov @ 2026-03-25 16:10 UTC (permalink / raw)
To: Oliver Neukum; +Cc: kees, linux-input
On Wed, Mar 25, 2026 at 03:32:46PM +0100, Oliver Neukum wrote:
> 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>
Applied, thank you.
--
Dmitry
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] input: pegasus_notetaker: use HID defines
2026-03-25 14:32 ` [PATCH 2/2] input: pegasus_notetaker: use HID defines Oliver Neukum
@ 2026-03-25 16:10 ` Dmitry Torokhov
0 siblings, 0 replies; 4+ messages in thread
From: Dmitry Torokhov @ 2026-03-25 16:10 UTC (permalink / raw)
To: Oliver Neukum; +Cc: kees, linux-input
On Wed, Mar 25, 2026 at 03:32:47PM +0100, Oliver Neukum wrote:
> 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>
Applied, thank you.
--
Dmitry
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-03-25 16:10 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-25 14:32 [PATCH 1/2] input: aiptek: use HID headers Oliver Neukum
2026-03-25 14:32 ` [PATCH 2/2] input: pegasus_notetaker: use HID defines Oliver Neukum
2026-03-25 16:10 ` Dmitry Torokhov
2026-03-25 16:10 ` [PATCH 1/2] input: aiptek: use HID headers Dmitry Torokhov
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.