diff mbox

[BUG?] hid-core.c: hid->name = dev->manufacturer + dev->product ... why not + dev->serial?

Message ID 201003071655.06644@rk-nord.at
State New, archived
Delegated to: Jiri Kosina
Headers show

Commit Message

Melchior FRANZ March 7, 2010, 3:55 p.m. UTC
None
diff mbox

Patch

--- a/drivers/hid/usbhid/hid-core.c     2010-03-04 02:49:38.676850618 +0100
+++ b/drivers/hid/usbhid/hid-core.c     2010-03-04 03:03:43.269006052 +0100
@@ -1131,6 +1131,12 @@ 
                strlcat(hid->name, dev->product, sizeof(hid->name));
        }
 
+       if (dev->serial) {
+               if (hid->name[0])
+                       strlcat(hid->name, " ", sizeof(hid->name));
+               strlcat(hid->name, dev->serial, sizeof(hid->name));
+       }
+
        if (!strlen(hid->name))
                snprintf(hid->name, sizeof(hid->name), "HID %04x:%04x",
                         le16_to_cpu(dev->descriptor.idVendor),