]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/hid/hid-core.c
HID: struct device - replace bus_id with dev_name(), dev_set_name()
[linux-2.6-omap-h63xx.git] / drivers / hid / hid-core.c
index 8be30037cffe05dc7dcac3dbb0e9bfdd9ef537f2..8624a8fe085b46bcb16d2254e1ec9ec406a9ad74 100644 (file)
@@ -1616,9 +1616,10 @@ int hid_add_device(struct hid_device *hdev)
        if (hid_ignore(hdev))
                return -ENODEV;
 
-       /* XXX hack, any other cleaner solution < 20 bus_id bytes? */
-       sprintf(hdev->dev.bus_id, "%04X:%04X:%04X.%04X", hdev->bus,
-                       hdev->vendor, hdev->product, atomic_inc_return(&id));
+       /* XXX hack, any other cleaner solution after the driver core
+        * is converted to allow more than 20 bytes as the device name? */
+       dev_set_name(&hdev->dev, "%04X:%04X:%04X.%04X", hdev->bus,
+                    hdev->vendor, hdev->product, atomic_inc_return(&id));
 
        ret = device_add(&hdev->dev);
        if (!ret)