]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/usb/core/hub.c
USB: make usbdevices export their device nodes instead of using a separate class
[linux-2.6-omap-h63xx.git] / drivers / usb / core / hub.c
index 19abe81babd57fbbd724812f787925f825e82925..2a0b15e42bc75762054e09565ec928acb8f9f155 100644 (file)
@@ -1367,11 +1367,15 @@ int usb_new_device(struct usb_device *udev)
        }
 #endif
 
+       /* export the usbdev device-node for libusb */
+       udev->dev.devt = MKDEV(USB_DEVICE_MAJOR,
+                       (((udev->bus->busnum-1) * 128) + (udev->devnum-1)));
+
        /* Register the device.  The device driver is responsible
-        * for adding the device files to usbfs and sysfs and for
-        * configuring the device.
+        * for adding the device files to sysfs and for configuring
+        * the device.
         */
-       err = device_add (&udev->dev);
+       err = device_add(&udev->dev);
        if (err) {
                dev_err(&udev->dev, "can't device_add, error %d\n", err);
                goto fail;