Browse Source

[PATCH] Input: kill devfs references

Input: remove references to devfs from input subsystem

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Dmitry Torokhov 19 năm trước cách đây
mục cha
commit
4f00469c16

+ 0 - 4
drivers/input/evdev.c

@@ -20,7 +20,6 @@
 #include <linux/major.h>
 #include <linux/major.h>
 #include <linux/smp_lock.h>
 #include <linux/smp_lock.h>
 #include <linux/device.h>
 #include <linux/device.h>
-#include <linux/devfs_fs_kernel.h>
 #include <linux/compat.h>
 #include <linux/compat.h>
 
 
 struct evdev {
 struct evdev {
@@ -687,8 +686,6 @@ static struct input_handle *evdev_connect(struct input_handler *handler, struct
 
 
 	evdev_table[minor] = evdev;
 	evdev_table[minor] = evdev;
 
 
-	devfs_mk_cdev(MKDEV(INPUT_MAJOR, EVDEV_MINOR_BASE + minor),
-			S_IFCHR|S_IRUGO|S_IWUSR, "input/event%d", minor);
 	class_device_create(input_class, NULL,
 	class_device_create(input_class, NULL,
 			MKDEV(INPUT_MAJOR, EVDEV_MINOR_BASE + minor),
 			MKDEV(INPUT_MAJOR, EVDEV_MINOR_BASE + minor),
 			dev->dev, "event%d", minor);
 			dev->dev, "event%d", minor);
@@ -703,7 +700,6 @@ static void evdev_disconnect(struct input_handle *handle)
 
 
 	class_device_destroy(input_class,
 	class_device_destroy(input_class,
 			MKDEV(INPUT_MAJOR, EVDEV_MINOR_BASE + evdev->minor));
 			MKDEV(INPUT_MAJOR, EVDEV_MINOR_BASE + evdev->minor));
-	devfs_remove("input/event%d", evdev->minor);
 	evdev->exist = 0;
 	evdev->exist = 0;
 
 
 	if (evdev->open) {
 	if (evdev->open) {

+ 0 - 7
drivers/input/input.c

@@ -22,7 +22,6 @@
 #include <linux/interrupt.h>
 #include <linux/interrupt.h>
 #include <linux/poll.h>
 #include <linux/poll.h>
 #include <linux/device.h>
 #include <linux/device.h>
-#include <linux/devfs_fs_kernel.h>
 
 
 MODULE_AUTHOR("Vojtech Pavlik <vojtech@suse.cz>");
 MODULE_AUTHOR("Vojtech Pavlik <vojtech@suse.cz>");
 MODULE_DESCRIPTION("Input core");
 MODULE_DESCRIPTION("Input core");
@@ -770,13 +769,8 @@ static int __init input_init(void)
 		goto fail2;
 		goto fail2;
 	}
 	}
 
 
-	err = devfs_mk_dir("input");
-	if (err)
-		goto fail3;
-
 	return 0;
 	return 0;
 
 
- fail3:	unregister_chrdev(INPUT_MAJOR, "input");
  fail2:	input_proc_exit();
  fail2:	input_proc_exit();
  fail1:	class_destroy(input_class);
  fail1:	class_destroy(input_class);
 	return err;
 	return err;
@@ -785,7 +779,6 @@ static int __init input_init(void)
 static void __exit input_exit(void)
 static void __exit input_exit(void)
 {
 {
 	input_proc_exit();
 	input_proc_exit();
-	devfs_remove("input");
 	unregister_chrdev(INPUT_MAJOR, "input");
 	unregister_chrdev(INPUT_MAJOR, "input");
 	class_destroy(input_class);
 	class_destroy(input_class);
 }
 }

+ 0 - 4
drivers/input/joydev.c

@@ -26,7 +26,6 @@
 #include <linux/init.h>
 #include <linux/init.h>
 #include <linux/smp_lock.h>
 #include <linux/smp_lock.h>
 #include <linux/device.h>
 #include <linux/device.h>
-#include <linux/devfs_fs_kernel.h>
 
 
 MODULE_AUTHOR("Vojtech Pavlik <vojtech@ucw.cz>");
 MODULE_AUTHOR("Vojtech Pavlik <vojtech@ucw.cz>");
 MODULE_DESCRIPTION("Joystick device interfaces");
 MODULE_DESCRIPTION("Joystick device interfaces");
@@ -514,8 +513,6 @@ static struct input_handle *joydev_connect(struct input_handler *handler, struct
 
 
 	joydev_table[minor] = joydev;
 	joydev_table[minor] = joydev;
 
 
-	devfs_mk_cdev(MKDEV(INPUT_MAJOR, JOYDEV_MINOR_BASE + minor),
-			S_IFCHR|S_IRUGO|S_IWUSR, "input/js%d", minor);
 	class_device_create(input_class, NULL,
 	class_device_create(input_class, NULL,
 			MKDEV(INPUT_MAJOR, JOYDEV_MINOR_BASE + minor),
 			MKDEV(INPUT_MAJOR, JOYDEV_MINOR_BASE + minor),
 			dev->dev, "js%d", minor);
 			dev->dev, "js%d", minor);
@@ -529,7 +526,6 @@ static void joydev_disconnect(struct input_handle *handle)
 	struct joydev_list *list;
 	struct joydev_list *list;
 
 
 	class_device_destroy(input_class, MKDEV(INPUT_MAJOR, JOYDEV_MINOR_BASE + joydev->minor));
 	class_device_destroy(input_class, MKDEV(INPUT_MAJOR, JOYDEV_MINOR_BASE + joydev->minor));
-	devfs_remove("input/js%d", joydev->minor);
 	joydev->exist = 0;
 	joydev->exist = 0;
 
 
 	if (joydev->open) {
 	if (joydev->open) {

+ 1 - 8
drivers/input/mousedev.c

@@ -9,7 +9,7 @@
  * the Free Software Foundation.
  * the Free Software Foundation.
  */
  */
 
 
-#define MOUSEDEV_MINOR_BASE 	32
+#define MOUSEDEV_MINOR_BASE	32
 #define MOUSEDEV_MINORS		32
 #define MOUSEDEV_MINORS		32
 #define MOUSEDEV_MIX		31
 #define MOUSEDEV_MIX		31
 
 
@@ -24,7 +24,6 @@
 #include <linux/random.h>
 #include <linux/random.h>
 #include <linux/major.h>
 #include <linux/major.h>
 #include <linux/device.h>
 #include <linux/device.h>
-#include <linux/devfs_fs_kernel.h>
 #ifdef CONFIG_INPUT_MOUSEDEV_PSAUX
 #ifdef CONFIG_INPUT_MOUSEDEV_PSAUX
 #include <linux/miscdevice.h>
 #include <linux/miscdevice.h>
 #endif
 #endif
@@ -649,8 +648,6 @@ static struct input_handle *mousedev_connect(struct input_handler *handler, stru
 
 
 	mousedev_table[minor] = mousedev;
 	mousedev_table[minor] = mousedev;
 
 
-	devfs_mk_cdev(MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + minor),
-			S_IFCHR|S_IRUGO|S_IWUSR, "input/mouse%d", minor);
 	class_device_create(input_class, NULL,
 	class_device_create(input_class, NULL,
 			MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + minor),
 			MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + minor),
 			dev->dev, "mouse%d", minor);
 			dev->dev, "mouse%d", minor);
@@ -665,7 +662,6 @@ static void mousedev_disconnect(struct input_handle *handle)
 
 
 	class_device_destroy(input_class,
 	class_device_destroy(input_class,
 			MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + mousedev->minor));
 			MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + mousedev->minor));
-	devfs_remove("input/mouse%d", mousedev->minor);
 	mousedev->exist = 0;
 	mousedev->exist = 0;
 
 
 	if (mousedev->open) {
 	if (mousedev->open) {
@@ -738,8 +734,6 @@ static int __init mousedev_init(void)
 	mousedev_mix.exist = 1;
 	mousedev_mix.exist = 1;
 	mousedev_mix.minor = MOUSEDEV_MIX;
 	mousedev_mix.minor = MOUSEDEV_MIX;
 
 
-	devfs_mk_cdev(MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + MOUSEDEV_MIX),
-			S_IFCHR|S_IRUGO|S_IWUSR, "input/mice");
 	class_device_create(input_class, NULL,
 	class_device_create(input_class, NULL,
 			MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + MOUSEDEV_MIX), NULL, "mice");
 			MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + MOUSEDEV_MIX), NULL, "mice");
 
 
@@ -759,7 +753,6 @@ static void __exit mousedev_exit(void)
 	if (psaux_registered)
 	if (psaux_registered)
 		misc_deregister(&psaux_mouse);
 		misc_deregister(&psaux_mouse);
 #endif
 #endif
-	devfs_remove("input/mice");
 	class_device_destroy(input_class,
 	class_device_destroy(input_class,
 			MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + MOUSEDEV_MIX));
 			MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + MOUSEDEV_MIX));
 	input_unregister_handler(&mousedev_handler);
 	input_unregister_handler(&mousedev_handler);

+ 0 - 7
drivers/input/tsdev.c

@@ -53,7 +53,6 @@
 #include <linux/random.h>
 #include <linux/random.h>
 #include <linux/time.h>
 #include <linux/time.h>
 #include <linux/device.h>
 #include <linux/device.h>
-#include <linux/devfs_fs_kernel.h>
 
 
 #ifndef CONFIG_INPUT_TSDEV_SCREEN_X
 #ifndef CONFIG_INPUT_TSDEV_SCREEN_X
 #define CONFIG_INPUT_TSDEV_SCREEN_X	240
 #define CONFIG_INPUT_TSDEV_SCREEN_X	240
@@ -410,10 +409,6 @@ static struct input_handle *tsdev_connect(struct input_handler *handler,
 
 
 	tsdev_table[minor] = tsdev;
 	tsdev_table[minor] = tsdev;
 
 
-	devfs_mk_cdev(MKDEV(INPUT_MAJOR, TSDEV_MINOR_BASE + minor),
-			S_IFCHR|S_IRUGO|S_IWUSR, "input/ts%d", minor);
-	devfs_mk_cdev(MKDEV(INPUT_MAJOR, TSDEV_MINOR_BASE + minor + TSDEV_MINORS/2),
-			S_IFCHR|S_IRUGO|S_IWUSR, "input/tsraw%d", minor);
 	class_device_create(input_class, NULL,
 	class_device_create(input_class, NULL,
 			MKDEV(INPUT_MAJOR, TSDEV_MINOR_BASE + minor),
 			MKDEV(INPUT_MAJOR, TSDEV_MINOR_BASE + minor),
 			dev->dev, "ts%d", minor);
 			dev->dev, "ts%d", minor);
@@ -428,8 +423,6 @@ static void tsdev_disconnect(struct input_handle *handle)
 
 
 	class_device_destroy(input_class,
 	class_device_destroy(input_class,
 			MKDEV(INPUT_MAJOR, TSDEV_MINOR_BASE + tsdev->minor));
 			MKDEV(INPUT_MAJOR, TSDEV_MINOR_BASE + tsdev->minor));
-	devfs_remove("input/ts%d", tsdev->minor);
-	devfs_remove("input/tsraw%d", tsdev->minor);
 	tsdev->exist = 0;
 	tsdev->exist = 0;
 
 
 	if (tsdev->open) {
 	if (tsdev->open) {