summaryrefslogtreecommitdiff
path: root/drivers/hid/hid-huion.c
diff options
context:
space:
mode:
authorNikolai Kondrashov <spbnick@gmail.com>2014-07-23 20:31:54 +0400
committerJiri Kosina <jkosina@suse.cz>2014-07-29 13:21:24 +0400
commite917e98f4829a5842ea8283548bf5dedfd88b2d0 (patch)
tree7e02c173ff340d5ed085642ceacf8fd2d89ff1e8 /drivers/hid/hid-huion.c
parent4c2f503aade27ebf12f5733a583d711f99dc5ec1 (diff)
downloadlinux-e917e98f4829a5842ea8283548bf5dedfd88b2d0.tar.xz
HID: huion: Use "tablet" instead of specific model
Use word "tablet" in identifiers and comments instead of referring to specific Huion tablet model name, as the product ID is used by at least several tablet models. Signed-off-by: Nikolai Kondrashov <spbnick@gmail.com> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/hid-huion.c')
-rw-r--r--drivers/hid/hid-huion.c25
1 files changed, 13 insertions, 12 deletions
diff --git a/drivers/hid/hid-huion.c b/drivers/hid/hid-huion.c
index cbf4da4689ba..25d01cdd3bbc 100644
--- a/drivers/hid/hid-huion.c
+++ b/drivers/hid/hid-huion.c
@@ -2,6 +2,7 @@
* HID driver for Huion devices not fully compliant with HID standard
*
* Copyright (c) 2013 Martin Rusko
+ * Copyright (c) 2014 Nikolai Kondrashov
*/
/*
@@ -19,11 +20,11 @@
#include "hid-ids.h"
-/* Original Huion 580 report descriptor size */
-#define HUION_580_RDESC_ORIG_SIZE 177
+/* Original tablet report descriptor size */
+#define HUION_TABLET_RDESC_ORIG_SIZE 177
-/* Fixed Huion 580 report descriptor */
-static __u8 huion_580_rdesc_fixed[] = {
+/* Fixed tablet report descriptor */
+static __u8 huion_tablet_rdesc_fixed[] = {
0x05, 0x0D, /* Usage Page (Digitizer), */
0x09, 0x02, /* Usage (Pen), */
0xA1, 0x01, /* Collection (Application), */
@@ -72,10 +73,10 @@ static __u8 *huion_report_fixup(struct hid_device *hdev, __u8 *rdesc,
unsigned int *rsize)
{
switch (hdev->product) {
- case USB_DEVICE_ID_HUION_580:
- if (*rsize == HUION_580_RDESC_ORIG_SIZE) {
- rdesc = huion_580_rdesc_fixed;
- *rsize = sizeof(huion_580_rdesc_fixed);
+ case USB_DEVICE_ID_HUION_TABLET:
+ if (*rsize == HUION_TABLET_RDESC_ORIG_SIZE) {
+ rdesc = huion_tablet_rdesc_fixed;
+ *rsize = sizeof(huion_tablet_rdesc_fixed);
}
break;
}
@@ -108,11 +109,11 @@ static int huion_probe(struct hid_device *hdev, const struct hid_device_id *id)
int ret;
struct usb_interface *intf = to_usb_interface(hdev->dev.parent);
- /* Ignore interfaces 1 (mouse) and 2 (keyboard) for Huion 580 tablet,
+ /* Ignore interfaces 1 (mouse) and 2 (keyboard) for tablet,
* as they are not used
*/
switch (id->product) {
- case USB_DEVICE_ID_HUION_580:
+ case USB_DEVICE_ID_HUION_TABLET:
if (intf->cur_altsetting->desc.bInterfaceNumber != 0x00)
return -ENODEV;
break;
@@ -131,7 +132,7 @@ static int huion_probe(struct hid_device *hdev, const struct hid_device_id *id)
}
switch (id->product) {
- case USB_DEVICE_ID_HUION_580:
+ case USB_DEVICE_ID_HUION_TABLET:
ret = huion_tablet_enable(hdev);
if (ret) {
hid_err(hdev, "tablet enabling failed\n");
@@ -158,7 +159,7 @@ static int huion_raw_event(struct hid_device *hdev, struct hid_report *report,
}
static const struct hid_device_id huion_devices[] = {
- { HID_USB_DEVICE(USB_VENDOR_ID_HUION, USB_DEVICE_ID_HUION_580) },
+ { HID_USB_DEVICE(USB_VENDOR_ID_HUION, USB_DEVICE_ID_HUION_TABLET) },
{ }
};
MODULE_DEVICE_TABLE(hid, huion_devices);