diff options
| author | Christoph Hellwig <hch@lst.de> | 2003-04-20 00:39:29 -0700 |
|---|---|---|
| committer | Christoph Hellwig <hch@lst.de> | 2003-04-20 00:39:29 -0700 |
| commit | 1c6099ba9a89e1287ff2198313dc7d2c2d6cac2a (patch) | |
| tree | 8f834f43cba19bac55e6e4cb29b01288a616f9a4 /drivers/input/input.c | |
| parent | b252064916e4c8985f5696845842a348470ece24 (diff) | |
[PATCH] devfs: input
Make sure input always uses devfs_remove. While at it I've also
remove lots of code duplication - every upper input driver contained
the code surrounding devfs_unregister in two identical copies.
Diffstat (limited to 'drivers/input/input.c')
| -rw-r--r-- | drivers/input/input.c | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/drivers/input/input.c b/drivers/input/input.c index bdf6020246e9..1989b14ea552 100644 --- a/drivers/input/input.c +++ b/drivers/input/input.c @@ -32,7 +32,6 @@ EXPORT_SYMBOL(input_unregister_device); EXPORT_SYMBOL(input_register_handler); EXPORT_SYMBOL(input_unregister_handler); EXPORT_SYMBOL(input_register_minor); -EXPORT_SYMBOL(input_unregister_minor); EXPORT_SYMBOL(input_open_device); EXPORT_SYMBOL(input_close_device); EXPORT_SYMBOL(input_accept_process); @@ -47,7 +46,6 @@ static LIST_HEAD(input_dev_list); static LIST_HEAD(input_handler_list); static struct input_handler *input_table[8]; -static devfs_handle_t input_devfs_handle; #ifdef CONFIG_PROC_FS static struct proc_dir_entry *proc_bus_input_dir; @@ -542,20 +540,13 @@ static struct file_operations input_fops = { .open = input_open_file, }; -devfs_handle_t input_register_minor(char *name, int minor, int minor_base) +void input_register_minor(char *name, int minor, int minor_base) { char devfs_name[16]; - sprintf(devfs_name, name, minor); - - return devfs_register(NULL, devfs_name, 0, - INPUT_MAJOR, minor + minor_base, - S_IFCHR|S_IRUGO|S_IWUSR, - &input_fops, NULL); -} -void input_unregister_minor(devfs_handle_t handle) -{ - devfs_unregister(handle); + sprintf(devfs_name, name, minor); + devfs_register(NULL, devfs_name, 0, INPUT_MAJOR, minor_base + minor, + S_IFCHR|S_IRUGO|S_IWUSR, &input_fops, NULL); } #ifdef CONFIG_PROC_FS @@ -699,8 +690,7 @@ static int __init input_init(void) return -EBUSY; } - input_devfs_handle = devfs_mk_dir("input"); - + devfs_mk_dir("input"); return 0; } @@ -711,7 +701,7 @@ static void __exit input_exit(void) remove_proc_entry("handlers", proc_bus_input_dir); remove_proc_entry("input", proc_bus); #endif - devfs_unregister(input_devfs_handle); + devfs_remove("input"); if (unregister_chrdev(INPUT_MAJOR, "input")) printk(KERN_ERR "input: can't unregister char major %d", INPUT_MAJOR); devclass_unregister(&input_devclass); |
