Commit 49b764ae authored by Ping Cheng's avatar Ping Cheng Committed by Dmitry Torokhov

Input: wacom - add device type to device name string

Devices supporting both pen and touch features share the same product ID,
but presented as 2 separate input devices. By adding device type to device
name string we can help userspace applications and users differentiate
between them. 'Finger' is used for the touch since touch has been used as
a suffix by userland hotplugging services.
Signed-off-by: default avatarJason Childs <oblivian@users.sourceforge.net>
Signed-off-by: default avatarPing Cheng <pingc@wacom.com>
Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
parent 23c239be
...@@ -592,7 +592,17 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i ...@@ -592,7 +592,17 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i
if (error) if (error)
goto fail2; goto fail2;
input_dev->name = features->name; strlcpy(wacom_wac->name, features->name, sizeof(wacom_wac->name));
if (features->type == TABLETPC || features->type == TABLETPC2FG) {
/* Append the device type to the name */
strlcat(wacom_wac->name,
features->device_type == BTN_TOOL_PEN ?
" Pen" : " Finger",
sizeof(wacom_wac->name));
}
input_dev->name = wacom_wac->name;
wacom->wacom_wac = wacom_wac; wacom->wacom_wac = wacom_wac;
input_dev->evbit[0] |= BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS); input_dev->evbit[0] |= BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS);
......
...@@ -73,10 +73,11 @@ struct wacom_features { ...@@ -73,10 +73,11 @@ struct wacom_features {
}; };
struct wacom_wac { struct wacom_wac {
char name[64];
unsigned char *data; unsigned char *data;
int tool[2]; int tool[2];
int id[2]; int id[2];
__u32 serial[2]; __u32 serial[2];
struct wacom_features features; struct wacom_features features;
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment