Signed-off-by: Kay Sievers <[EMAIL PROTECTED]>

===== drivers/usb/core/file.c 1.17 vs edited =====
--- 1.17/drivers/usb/core/file.c        2005-01-15 01:01:44 +01:00
+++ edited/drivers/usb/core/file.c      2005-01-22 15:15:05 +01:00
@@ -107,13 +107,6 @@ void usb_major_cleanup(void)
        unregister_chrdev(USB_MAJOR, "usb");
 }
 
-static ssize_t show_dev(struct class_device *class_dev, char *buf)
-{
-       int minor = (int)(long)class_get_devdata(class_dev);
-       return print_dev_t(buf, MKDEV(USB_MAJOR, minor));
-}
-static CLASS_DEVICE_ATTR(dev, S_IRUGO, show_dev, NULL);
-
 /**
  * usb_register_dev - register a USB device, and ask for a minor number
  * @intf: pointer to the usb_interface that is being registered
@@ -184,6 +177,7 @@ int usb_register_dev(struct usb_interfac
        class_dev = kmalloc(sizeof(*class_dev), GFP_KERNEL);
        if (class_dev) {
                memset(class_dev, 0x00, sizeof(struct class_device));
+               class_dev->devt = MKDEV(USB_MAJOR, minor);
                class_dev->class = &usb_class;
                class_dev->dev = &intf->dev;
 
@@ -195,7 +189,6 @@ int usb_register_dev(struct usb_interfac
                snprintf(class_dev->class_id, BUS_ID_SIZE, "%s", temp);
                class_set_devdata(class_dev, (void *)(long)intf->minor);
                class_device_register(class_dev);
-               class_device_create_file(class_dev, &class_device_attr_dev);
                intf->class_dev = class_dev;
        }
 exit:

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to