aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/hid')
-rw-r--r--drivers/hid/hid-core.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index 8be30037cffe..8624a8fe085b 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -1616,9 +1616,10 @@ int hid_add_device(struct hid_device *hdev)
1616 if (hid_ignore(hdev)) 1616 if (hid_ignore(hdev))
1617 return -ENODEV; 1617 return -ENODEV;
1618 1618
1619 /* XXX hack, any other cleaner solution < 20 bus_id bytes? */ 1619 /* XXX hack, any other cleaner solution after the driver core
1620 sprintf(hdev->dev.bus_id, "%04X:%04X:%04X.%04X", hdev->bus, 1620 * is converted to allow more than 20 bytes as the device name? */
1621 hdev->vendor, hdev->product, atomic_inc_return(&id)); 1621 dev_set_name(&hdev->dev, "%04X:%04X:%04X.%04X", hdev->bus,
1622 hdev->vendor, hdev->product, atomic_inc_return(&id));
1622 1623
1623 ret = device_add(&hdev->dev); 1624 ret = device_add(&hdev->dev);
1624 if (!ret) 1625 if (!ret)