mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-18 01:34:14 +08:00
HID: wacom: Do not add suffix to name of devices with an unknown type
The naming logic currently assumes that all devices will be a pen, finger, or pad. Though this has historically been the case, the new HID_GENERIC catch-all may cause us to probe devices with Wacom's 056A VID which aren't any of these types (e.g. the "Cintiq 24HDT Monitor Control"). This patch updates the logic so that no suffix will be added to the device name if the device type is unknown. Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com> Reviewed-by: Ping Cheng <pingc@wacom.com> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
This commit is contained in:
parent
c24eab4e0e
commit
8d80f790ec
@ -1440,13 +1440,16 @@ static void wacom_update_name(struct wacom *wacom)
|
||||
snprintf(wacom_wac->pad_name, sizeof(wacom_wac->pad_name),
|
||||
"%s Pad", wacom_wac->name);
|
||||
|
||||
if (features->device_type != BTN_TOOL_FINGER)
|
||||
if (features->device_type == BTN_TOOL_PEN) {
|
||||
strlcat(wacom_wac->name, " Pen", WACOM_NAME_MAX);
|
||||
else if (features->touch_max)
|
||||
}
|
||||
else if (features->device_type == BTN_TOOL_FINGER) {
|
||||
if (features->touch_max)
|
||||
strlcat(wacom_wac->name, " Finger", WACOM_NAME_MAX);
|
||||
else
|
||||
strlcat(wacom_wac->name, " Pad", WACOM_NAME_MAX);
|
||||
}
|
||||
}
|
||||
|
||||
static int wacom_probe(struct hid_device *hdev,
|
||||
const struct hid_device_id *id)
|
||||
|
Loading…
Reference in New Issue
Block a user