HID: wacom: retrieve name from HID descriptor for generic devices
authorPing Cheng <pinglinux@gmail.com>
Fri, 24 Apr 2015 22:32:51 +0000 (15:32 -0700)
committerJiri Kosina <jkosina@suse.cz>
Mon, 27 Apr 2015 09:08:12 +0000 (11:08 +0200)
commitc24eab4e0e449845ba98e649b0605ab0450193db
treee194a2d1fc3b57c8aa1338327f40cdab8f9840d6
parent007760cf082392b65a05c40eb615c5f8294b441a
HID: wacom: retrieve name from HID descriptor for generic devices

HID generic devices share the same default name, "Wacom HID". This
causes userland programs to show same device names for different
devices, which would confuse end users with same device names for
different devices too.

This patch uses name retrieved from HID descriptor, if a meaningful
name is reported. Otherwise, affix its product ID to "Wacom HID".

Names from descriptor may contain extra whitespaces. To comfort
readers' eyes, we removed those extra whitespaces too.

Signed-off-by: Ping Cheng <pingc@wacom.com>
Reviewed-by: Jason Gerecke <killertofu@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/wacom_sys.c