diff options
Diffstat (limited to 'drivers/char/misc.c')
-rw-r--r-- | drivers/char/misc.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/drivers/char/misc.c b/drivers/char/misc.c index 96eb2a709e21..dfe1cede3916 100644 --- a/drivers/char/misc.c +++ b/drivers/char/misc.c | |||
@@ -44,7 +44,6 @@ | |||
44 | #include <linux/slab.h> | 44 | #include <linux/slab.h> |
45 | #include <linux/proc_fs.h> | 45 | #include <linux/proc_fs.h> |
46 | #include <linux/seq_file.h> | 46 | #include <linux/seq_file.h> |
47 | #include <linux/devfs_fs_kernel.h> | ||
48 | #include <linux/stat.h> | 47 | #include <linux/stat.h> |
49 | #include <linux/init.h> | 48 | #include <linux/init.h> |
50 | #include <linux/device.h> | 49 | #include <linux/device.h> |
@@ -204,7 +203,7 @@ int misc_register(struct miscdevice * misc) | |||
204 | { | 203 | { |
205 | struct miscdevice *c; | 204 | struct miscdevice *c; |
206 | dev_t dev; | 205 | dev_t dev; |
207 | int err; | 206 | int err = 0; |
208 | 207 | ||
209 | down(&misc_sem); | 208 | down(&misc_sem); |
210 | list_for_each_entry(c, &misc_list, list) { | 209 | list_for_each_entry(c, &misc_list, list) { |
@@ -228,10 +227,6 @@ int misc_register(struct miscdevice * misc) | |||
228 | 227 | ||
229 | if (misc->minor < DYNAMIC_MINORS) | 228 | if (misc->minor < DYNAMIC_MINORS) |
230 | misc_minors[misc->minor >> 3] |= 1 << (misc->minor & 7); | 229 | misc_minors[misc->minor >> 3] |= 1 << (misc->minor & 7); |
231 | if (misc->devfs_name[0] == '\0') { | ||
232 | snprintf(misc->devfs_name, sizeof(misc->devfs_name), | ||
233 | "misc/%s", misc->name); | ||
234 | } | ||
235 | dev = MKDEV(MISC_MAJOR, misc->minor); | 230 | dev = MKDEV(MISC_MAJOR, misc->minor); |
236 | 231 | ||
237 | misc->class = class_device_create(misc_class, NULL, dev, misc->dev, | 232 | misc->class = class_device_create(misc_class, NULL, dev, misc->dev, |
@@ -241,13 +236,6 @@ int misc_register(struct miscdevice * misc) | |||
241 | goto out; | 236 | goto out; |
242 | } | 237 | } |
243 | 238 | ||
244 | err = devfs_mk_cdev(dev, S_IFCHR|S_IRUSR|S_IWUSR|S_IRGRP, | ||
245 | misc->devfs_name); | ||
246 | if (err) { | ||
247 | class_device_destroy(misc_class, dev); | ||
248 | goto out; | ||
249 | } | ||
250 | |||
251 | /* | 239 | /* |
252 | * Add it to the front, so that later devices can "override" | 240 | * Add it to the front, so that later devices can "override" |
253 | * earlier defaults | 241 | * earlier defaults |
@@ -278,7 +266,6 @@ int misc_deregister(struct miscdevice * misc) | |||
278 | down(&misc_sem); | 266 | down(&misc_sem); |
279 | list_del(&misc->list); | 267 | list_del(&misc->list); |
280 | class_device_destroy(misc_class, MKDEV(MISC_MAJOR, misc->minor)); | 268 | class_device_destroy(misc_class, MKDEV(MISC_MAJOR, misc->minor)); |
281 | devfs_remove(misc->devfs_name); | ||
282 | if (i < DYNAMIC_MINORS && i>0) { | 269 | if (i < DYNAMIC_MINORS && i>0) { |
283 | misc_minors[i>>3] &= ~(1 << (misc->minor & 7)); | 270 | misc_minors[i>>3] &= ~(1 << (misc->minor & 7)); |
284 | } | 271 | } |