diff options
author | Ping Cheng <pinglinux@gmail.com> | 2010-02-20 00:53:49 -0800 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2010-02-20 01:22:44 -0800 |
commit | 49b764aebde6ceea393f56cd3449bfa5720f8383 (patch) | |
tree | 6c74b3d42e4f1705e9f6d2766cd91940f9409249 /drivers/input/tablet/wacom_sys.c | |
parent | 23c239be223d7427da51656d6f196bde965d9796 (diff) | |
download | kernel_goldelico_gta04-49b764aebde6ceea393f56cd3449bfa5720f8383.zip kernel_goldelico_gta04-49b764aebde6ceea393f56cd3449bfa5720f8383.tar.gz kernel_goldelico_gta04-49b764aebde6ceea393f56cd3449bfa5720f8383.tar.bz2 |
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: Jason Childs <oblivian@users.sourceforge.net>
Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/tablet/wacom_sys.c')
-rw-r--r-- | drivers/input/tablet/wacom_sys.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c index f22b88d..a1770e6 100644 --- a/drivers/input/tablet/wacom_sys.c +++ b/drivers/input/tablet/wacom_sys.c @@ -592,7 +592,17 @@ static int wacom_probe(struct usb_interface *intf, const struct usb_device_id *i if (error) 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; input_dev->evbit[0] |= BIT_MASK(EV_KEY) | BIT_MASK(EV_ABS); |