Skip to content

Commit a721b14

Browse files
JoseExpositoJiri Kosina
authored andcommitted
HID: uclogic: Expose firmware name
Some vendors reuse the same product ID for different tablets, making it difficult for userspace to figure out which table is connected. While matching the device name has been used in the past by userspace to workaround this limitation, some devices have shown that this is not always a valid approach [1]. However, if userspace could access the firmware version name, it would be possible to know which tablet is actually connected by matching it against a list of known firmware names [2]. This patch exposes the firmware version name in the hid->uniq field. Link: linuxwacom/libwacom#609 [1] Link: linuxwacom/libwacom#610 [2] Signed-off-by: José Expósito <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
1 parent 3e78a6c commit a721b14

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/hid/hid-uclogic-params.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -884,6 +884,9 @@ static int uclogic_params_huion_init(struct uclogic_params *params,
884884
goto cleanup;
885885
}
886886

887+
/* The firmware is used in userspace as unique identifier */
888+
strscpy(hdev->uniq, ver_ptr, sizeof(hdev->uniq));
889+
887890
/* If this is a transition firmware */
888891
if (strcmp(ver_ptr, transition_ver) == 0) {
889892
hid_dbg(hdev,

0 commit comments

Comments
 (0)