usbcore: trivial whitespace fixes
[safe/jmp/linux-2.6] / drivers / usb / core / file.c
index 8de4f8c..01c857a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * drivers/usb/file.c
+ * drivers/usb/core/file.c
  *
  * (C) Copyright Linus Torvalds 1999
  * (C) Copyright Johannes Erdfelt 1999-2001
@@ -55,7 +55,7 @@ static int usb_open(struct inode * inode, struct file * file)
        return err;
 }
 
-static struct file_operations usb_fops = {
+static const struct file_operations usb_fops = {
        .owner =        THIS_MODULE,
        .open =         usb_open,
 };
@@ -194,14 +194,13 @@ int usb_register_dev(struct usb_interface *intf,
                ++temp;
        else
                temp = name;
-       intf->class_dev = class_device_create(usb_class->class, NULL,
-                                             MKDEV(USB_MAJOR, minor),
-                                             &intf->dev, "%s", temp);
-       if (IS_ERR(intf->class_dev)) {
+       intf->usb_dev = device_create(usb_class->class, &intf->dev,
+                                     MKDEV(USB_MAJOR, minor), "%s", temp);
+       if (IS_ERR(intf->usb_dev)) {
                spin_lock (&minor_lock);
                usb_minors[intf->minor] = NULL;
                spin_unlock (&minor_lock);
-               retval = PTR_ERR(intf->class_dev);
+               retval = PTR_ERR(intf->usb_dev);
        }
 exit:
        return retval;
@@ -242,8 +241,8 @@ void usb_deregister_dev(struct usb_interface *intf,
        spin_unlock (&minor_lock);
 
        snprintf(name, BUS_ID_SIZE, class_driver->name, intf->minor - minor_base);
-       class_device_destroy(usb_class->class, MKDEV(USB_MAJOR, intf->minor));
-       intf->class_dev = NULL;
+       device_destroy(usb_class->class, MKDEV(USB_MAJOR, intf->minor));
+       intf->usb_dev = NULL;
        intf->minor = -1;
        destroy_usb_class();
 }