Commit 62e492d5 authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] socksys.c cleanup

	removed gratitious local devfs_handle_t variable
parent e038ef09
...@@ -171,8 +171,6 @@ static struct file_operations socksys_fops = { ...@@ -171,8 +171,6 @@ static struct file_operations socksys_fops = {
.release = socksys_release, .release = socksys_release,
}; };
static devfs_handle_t devfs_handle;
int __init int __init
init_socksys(void) init_socksys(void)
{ {
...@@ -193,10 +191,10 @@ init_socksys(void) ...@@ -193,10 +191,10 @@ init_socksys(void)
printk ("Couldn't create socket\n"); printk ("Couldn't create socket\n");
return ret; return ret;
} }
devfs_handle = devfs_register (NULL, "socksys", DEVFS_FL_DEFAULT, devfs_register (NULL, "socksys", DEVFS_FL_DEFAULT,
30, 0, 30, 0,
S_IFCHR | S_IRUSR | S_IWUSR, S_IFCHR | S_IRUSR | S_IWUSR,
&socksys_fops, NULL); &socksys_fops, NULL);
file = fcheck(ret); file = fcheck(ret);
/* N.B. Is this valid? Suppose the f_ops are in a module ... */ /* N.B. Is this valid? Suppose the f_ops are in a module ... */
socksys_file_ops = *file->f_op; socksys_file_ops = *file->f_op;
...@@ -212,5 +210,5 @@ cleanup_socksys(void) ...@@ -212,5 +210,5 @@ cleanup_socksys(void)
{ {
if (unregister_chrdev(30, "socksys")) if (unregister_chrdev(30, "socksys"))
printk ("Couldn't unregister socksys character device\n"); printk ("Couldn't unregister socksys character device\n");
devfs_unregister (devfs_handle); devfs_remove ("socksys");
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment