ChangeSet 1.1159, 2003/04/28 23:32:36-07:00, greg@kroah.com

driver core: fix up the input_class logic due to the class changes.


 drivers/input/evbug.c        |   12 ------------
 drivers/input/evdev.c        |   12 ------------
 drivers/input/input.c        |    8 ++++----
 drivers/input/joydev.c       |   12 ------------
 drivers/input/mousedev.c     |   11 -----------
 drivers/input/tsdev.c        |   12 ------------
 drivers/usb/input/hid-core.c |    3 ---
 include/linux/input.h        |    2 +-
 8 files changed, 5 insertions(+), 67 deletions(-)


diff -Nru a/drivers/input/evbug.c b/drivers/input/evbug.c
--- a/drivers/input/evbug.c	Tue Apr 29 09:48:01 2003
+++ b/drivers/input/evbug.c	Tue Apr 29 09:48:01 2003
@@ -88,19 +88,8 @@
 	.id_table =	evbug_ids,
 };
 
-static struct device_interface evbug_intf = {
-	.name		= "debug",
-	.devclass	= &input_devclass,
-};
-
 int __init evbug_init(void)
 {
-	int retval;
-
-	retval = interface_register(&evbug_intf);
-	if(retval < 0)
-		return retval;
-
 	input_register_handler(&evbug_handler);
 	return 0;
 }
@@ -108,7 +97,6 @@
 void __exit evbug_exit(void)
 {
 	input_unregister_handler(&evbug_handler);
-	interface_unregister(&evbug_intf);
 }
 
 module_init(evbug_init);
diff -Nru a/drivers/input/evdev.c b/drivers/input/evdev.c
--- a/drivers/input/evdev.c	Tue Apr 29 09:48:01 2003
+++ b/drivers/input/evdev.c	Tue Apr 29 09:48:01 2003
@@ -435,19 +435,8 @@
 	.id_table =	evdev_ids,
 };
 
-static struct device_interface evdev_intf = {
-	.name		= "event",
-	.devclass	= &input_devclass,
-};
-
 static int __init evdev_init(void)
 {
-	int retval;
-
-	retval = interface_register(&evdev_intf);
-	if(retval < 0)
-		return retval;
-
 	input_register_handler(&evdev_handler);
 	return 0;
 }
@@ -455,7 +444,6 @@
 static void __exit evdev_exit(void)
 {
 	input_unregister_handler(&evdev_handler);
-	interface_unregister(&evdev_intf);
 }
 
 module_init(evdev_init);
diff -Nru a/drivers/input/input.c b/drivers/input/input.c
--- a/drivers/input/input.c	Tue Apr 29 09:48:01 2003
+++ b/drivers/input/input.c	Tue Apr 29 09:48:01 2003
@@ -38,7 +38,7 @@
 EXPORT_SYMBOL(input_accept_process);
 EXPORT_SYMBOL(input_flush_device);
 EXPORT_SYMBOL(input_event);
-EXPORT_SYMBOL(input_devclass);
+EXPORT_SYMBOL(input_class);
 
 #define INPUT_MAJOR	13
 #define INPUT_DEVICES	256
@@ -667,7 +667,7 @@
 
 #endif
 
-struct device_class input_devclass = {
+struct class input_class = {
 	.name		= "input",
 };
 
@@ -675,7 +675,7 @@
 {
 	struct proc_dir_entry *entry;
 
-	devclass_register(&input_devclass);
+	class_register(&input_class);
 
 #ifdef CONFIG_PROC_FS
 	proc_bus_input_dir = proc_mkdir("input", proc_bus);
@@ -705,7 +705,7 @@
 	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);
+	class_unregister(&input_class);
 }
 
 subsys_initcall(input_init);
diff -Nru a/drivers/input/joydev.c b/drivers/input/joydev.c
--- a/drivers/input/joydev.c	Tue Apr 29 09:48:01 2003
+++ b/drivers/input/joydev.c	Tue Apr 29 09:48:01 2003
@@ -493,19 +493,8 @@
 	.id_table =	joydev_ids,
 };
 
-static struct device_interface joydev_intf = {
-	.name		= "joystick",
-	.devclass	= &input_devclass,
-};
-
 static int __init joydev_init(void)
 {
-	int retval;
-
-	retval = interface_register(&joydev_intf);
-	if(retval < 0)
-		return retval;
-
 	input_register_handler(&joydev_handler);
 	return 0;
 }
@@ -513,7 +502,6 @@
 static void __exit joydev_exit(void)
 {
 	input_unregister_handler(&joydev_handler);
-	interface_unregister(&joydev_intf);
 }
 
 module_init(joydev_init);
diff -Nru a/drivers/input/mousedev.c b/drivers/input/mousedev.c
--- a/drivers/input/mousedev.c	Tue Apr 29 09:48:01 2003
+++ b/drivers/input/mousedev.c	Tue Apr 29 09:48:01 2003
@@ -492,18 +492,8 @@
 };
 #endif
 
-static struct device_interface mousedev_intf = {
-	.name		= "mouse",
-	.devclass	= &input_devclass,
-};
-
 static int __init mousedev_init(void)
 {
-	int retval;
-
-	if((retval = interface_register(&mousedev_intf)) < 0)
-		return retval;
-
 	input_register_handler(&mousedev_handler);
 
 	memset(&mousedev_mix, 0, sizeof(struct mousedev));
@@ -532,7 +522,6 @@
 #endif
 	devfs_remove("input/mice");
 	input_unregister_handler(&mousedev_handler);
-	interface_unregister(&mousedev_intf);
 }
 
 module_init(mousedev_init);
diff -Nru a/drivers/input/tsdev.c b/drivers/input/tsdev.c
--- a/drivers/input/tsdev.c	Tue Apr 29 09:48:01 2003
+++ b/drivers/input/tsdev.c	Tue Apr 29 09:48:01 2003
@@ -378,19 +378,8 @@
 	.id_table =	tsdev_ids,
 };
 
-static struct device_interface tsdev_intf = {
-	.name		= "touchscreen",
-	.devclass	= &input_devclass,
-};
-
 static int __init tsdev_init(void)
 {
-	int retval;
-
-	retval = interface_register(&tsdev_intf);
-	if(retval < 0)
-		return retval;
-
 	input_register_handler(&tsdev_handler);
 	printk(KERN_INFO "ts: Compaq touchscreen protocol output\n");
 	return 0;
@@ -399,7 +388,6 @@
 static void __exit tsdev_exit(void)
 {
 	input_unregister_handler(&tsdev_handler);
-	interface_unregister(&tsdev_intf);
 }
 
 module_init(tsdev_init);
diff -Nru a/drivers/usb/input/hid-core.c b/drivers/usb/input/hid-core.c
--- a/drivers/usb/input/hid-core.c	Tue Apr 29 09:48:01 2003
+++ b/drivers/usb/input/hid-core.c	Tue Apr 29 09:48:01 2003
@@ -1664,9 +1664,6 @@
 	.probe =	hid_probe,
 	.disconnect =	hid_disconnect,
 	.id_table =	hid_usb_ids,
-	.driver	= {
-		.devclass = &input_devclass,
-	},
 };
 
 static int __init hid_init(void)
diff -Nru a/include/linux/input.h b/include/linux/input.h
--- a/include/linux/input.h	Tue Apr 29 09:48:01 2003
+++ b/include/linux/input.h	Tue Apr 29 09:48:01 2003
@@ -908,7 +908,7 @@
 #define input_regs(a,b)		do { (a)->regs = (b); } while (0)
 #define input_sync(a)		do { input_event(a, EV_SYN, SYN_REPORT, 0); (a)->regs = NULL; } while (0)
 
-extern struct device_class input_devclass;
+extern struct class input_class;
 
 #endif
 #endif
