diff options
author | gregkh@suse.de <gregkh@suse.de> | 2005-03-23 13:01:41 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2005-06-20 18:15:09 -0400 |
commit | 56b2293595b2eb52cc2aa2baf92c6cfa8265f9d5 (patch) | |
tree | 5cbada5b35b1b87dfd75852c9397a2b14dfbb9d9 /drivers/usb | |
parent | 8874b414ffe037c39e73bb262ddf69653a13c0a4 (diff) |
[PATCH] class: convert drivers/* to use the new class api instead of class_simple
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/core/file.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/usb/core/file.c b/drivers/usb/core/file.c index 38ed2220c9fc..dfcbd05d0e81 100644 --- a/drivers/usb/core/file.c +++ b/drivers/usb/core/file.c | |||
@@ -68,7 +68,7 @@ static struct file_operations usb_fops = { | |||
68 | .open = usb_open, | 68 | .open = usb_open, |
69 | }; | 69 | }; |
70 | 70 | ||
71 | static struct class_simple *usb_class; | 71 | static struct class *usb_class; |
72 | 72 | ||
73 | int usb_major_init(void) | 73 | int usb_major_init(void) |
74 | { | 74 | { |
@@ -80,9 +80,9 @@ int usb_major_init(void) | |||
80 | goto out; | 80 | goto out; |
81 | } | 81 | } |
82 | 82 | ||
83 | usb_class = class_simple_create(THIS_MODULE, "usb"); | 83 | usb_class = class_create(THIS_MODULE, "usb"); |
84 | if (IS_ERR(usb_class)) { | 84 | if (IS_ERR(usb_class)) { |
85 | err("class_simple_create failed for usb devices"); | 85 | err("class_create failed for usb devices"); |
86 | unregister_chrdev(USB_MAJOR, "usb"); | 86 | unregister_chrdev(USB_MAJOR, "usb"); |
87 | goto out; | 87 | goto out; |
88 | } | 88 | } |
@@ -95,7 +95,7 @@ out: | |||
95 | 95 | ||
96 | void usb_major_cleanup(void) | 96 | void usb_major_cleanup(void) |
97 | { | 97 | { |
98 | class_simple_destroy(usb_class); | 98 | class_destroy(usb_class); |
99 | devfs_remove("usb"); | 99 | devfs_remove("usb"); |
100 | unregister_chrdev(USB_MAJOR, "usb"); | 100 | unregister_chrdev(USB_MAJOR, "usb"); |
101 | } | 101 | } |
@@ -171,7 +171,7 @@ int usb_register_dev(struct usb_interface *intf, | |||
171 | ++temp; | 171 | ++temp; |
172 | else | 172 | else |
173 | temp = name; | 173 | temp = name; |
174 | intf->class_dev = class_simple_device_add(usb_class, MKDEV(USB_MAJOR, minor), &intf->dev, "%s", temp); | 174 | intf->class_dev = class_device_create(usb_class, MKDEV(USB_MAJOR, minor), &intf->dev, "%s", temp); |
175 | if (IS_ERR(intf->class_dev)) { | 175 | if (IS_ERR(intf->class_dev)) { |
176 | spin_lock (&minor_lock); | 176 | spin_lock (&minor_lock); |
177 | usb_minors[intf->minor] = NULL; | 177 | usb_minors[intf->minor] = NULL; |
@@ -220,7 +220,7 @@ void usb_deregister_dev(struct usb_interface *intf, | |||
220 | 220 | ||
221 | snprintf(name, BUS_ID_SIZE, class_driver->name, intf->minor - minor_base); | 221 | snprintf(name, BUS_ID_SIZE, class_driver->name, intf->minor - minor_base); |
222 | devfs_remove (name); | 222 | devfs_remove (name); |
223 | class_simple_device_remove(MKDEV(USB_MAJOR, intf->minor)); | 223 | class_device_destroy(usb_class, MKDEV(USB_MAJOR, intf->minor)); |
224 | intf->class_dev = NULL; | 224 | intf->class_dev = NULL; |
225 | intf->minor = -1; | 225 | intf->minor = -1; |
226 | } | 226 | } |