]> err.no Git - linux-2.6/commitdiff
[PATCH] INPUT: move to use the new class code, instead of class_simple
authorgregkh@suse.de <gregkh@suse.de>
Tue, 15 Mar 2005 22:26:30 +0000 (14:26 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 20 Jun 2005 22:15:04 +0000 (15:15 -0700)
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/input/evdev.c
drivers/input/input.c
drivers/input/joydev.c
drivers/input/mousedev.c
drivers/input/tsdev.c
include/linux/input.h

index 17552a29978b862853e3bacf413547e2237e5931..556264b43425ce89a0079154c0be8479a78d0a5d 100644 (file)
@@ -431,9 +431,9 @@ static struct input_handle *evdev_connect(struct input_handler *handler, struct
 
        devfs_mk_cdev(MKDEV(INPUT_MAJOR, EVDEV_MINOR_BASE + minor),
                        S_IFCHR|S_IRUGO|S_IWUSR, "input/event%d", minor);
-       class_simple_device_add(input_class,
-                               MKDEV(INPUT_MAJOR, EVDEV_MINOR_BASE + minor),
-                               dev->dev, "event%d", minor);
+       class_device_create(input_class,
+                       MKDEV(INPUT_MAJOR, EVDEV_MINOR_BASE + minor),
+                       dev->dev, "event%d", minor);
 
        return &evdev->handle;
 }
@@ -443,7 +443,8 @@ static void evdev_disconnect(struct input_handle *handle)
        struct evdev *evdev = handle->private;
        struct evdev_list *list;
 
-       class_simple_device_remove(MKDEV(INPUT_MAJOR, EVDEV_MINOR_BASE + evdev->minor));
+       class_device_destroy(input_class,
+                       MKDEV(INPUT_MAJOR, EVDEV_MINOR_BASE + evdev->minor));
        devfs_remove("input/event%d", evdev->minor);
        evdev->exist = 0;
 
index 3385dd03abfc17be819ce992eb8bc314eb64abc5..83c77c990ddab8b8e6a6e17e4f360d3d2d0b40d1 100644 (file)
@@ -702,13 +702,13 @@ static int __init input_proc_init(void)
 static inline int input_proc_init(void) { return 0; }
 #endif
 
-struct class_simple *input_class;
+struct class *input_class;
 
 static int __init input_init(void)
 {
        int retval = -ENOMEM;
 
-       input_class = class_simple_create(THIS_MODULE, "input");
+       input_class = class_create(THIS_MODULE, "input");
        if (IS_ERR(input_class))
                return PTR_ERR(input_class);
        input_proc_init();
@@ -718,7 +718,7 @@ static int __init input_init(void)
                remove_proc_entry("devices", proc_bus_input_dir);
                remove_proc_entry("handlers", proc_bus_input_dir);
                remove_proc_entry("input", proc_bus);
-               class_simple_destroy(input_class);
+               class_destroy(input_class);
                return retval;
        }
 
@@ -728,7 +728,7 @@ static int __init input_init(void)
                remove_proc_entry("handlers", proc_bus_input_dir);
                remove_proc_entry("input", proc_bus);
                unregister_chrdev(INPUT_MAJOR, "input");
-               class_simple_destroy(input_class);
+               class_destroy(input_class);
        }
        return retval;
 }
@@ -741,7 +741,7 @@ static void __exit input_exit(void)
 
        devfs_remove("input");
        unregister_chrdev(INPUT_MAJOR, "input");
-       class_simple_destroy(input_class);
+       class_destroy(input_class);
 }
 
 subsys_initcall(input_init);
index 627d343dfba17cecce6aaa64cc27471f600a01ed..39775fc380c77446e258fd6927760ee21974798a 100644 (file)
@@ -452,9 +452,9 @@ static struct input_handle *joydev_connect(struct input_handler *handler, struct
 
        devfs_mk_cdev(MKDEV(INPUT_MAJOR, JOYDEV_MINOR_BASE + minor),
                        S_IFCHR|S_IRUGO|S_IWUSR, "input/js%d", minor);
-       class_simple_device_add(input_class,
-                               MKDEV(INPUT_MAJOR, JOYDEV_MINOR_BASE + minor),
-                               dev->dev, "js%d", minor);
+       class_device_create(input_class,
+                       MKDEV(INPUT_MAJOR, JOYDEV_MINOR_BASE + minor),
+                       dev->dev, "js%d", minor);
 
        return &joydev->handle;
 }
@@ -464,7 +464,7 @@ static void joydev_disconnect(struct input_handle *handle)
        struct joydev *joydev = handle->private;
        struct joydev_list *list;
 
-       class_simple_device_remove(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;
 
index 96fb9870834abfbb6b15b2a2df423b315dbc9da1..062848ac7e6b50f1a35f4c91b96fbe4a3d387487 100644 (file)
@@ -647,9 +647,9 @@ static struct input_handle *mousedev_connect(struct input_handler *handler, stru
 
        devfs_mk_cdev(MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + minor),
                        S_IFCHR|S_IRUGO|S_IWUSR, "input/mouse%d", minor);
-       class_simple_device_add(input_class,
-                               MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + minor),
-                               dev->dev, "mouse%d", minor);
+       class_device_create(input_class,
+                       MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + minor),
+                       dev->dev, "mouse%d", minor);
 
        return &mousedev->handle;
 }
@@ -659,7 +659,8 @@ static void mousedev_disconnect(struct input_handle *handle)
        struct mousedev *mousedev = handle->private;
        struct mousedev_list *list;
 
-       class_simple_device_remove(MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + mousedev->minor));
+       class_device_destroy(input_class,
+                       MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + mousedev->minor));
        devfs_remove("input/mouse%d", mousedev->minor);
        mousedev->exist = 0;
 
@@ -735,8 +736,8 @@ static int __init mousedev_init(void)
 
        devfs_mk_cdev(MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + MOUSEDEV_MIX),
                        S_IFCHR|S_IRUGO|S_IWUSR, "input/mice");
-       class_simple_device_add(input_class, MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + MOUSEDEV_MIX),
-                               NULL, "mice");
+       class_device_create(input_class,
+                       MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + MOUSEDEV_MIX), NULL, "mice");
 
 #ifdef CONFIG_INPUT_MOUSEDEV_PSAUX
        if (!(psaux_registered = !misc_register(&psaux_mouse)))
@@ -755,7 +756,8 @@ static void __exit mousedev_exit(void)
                misc_deregister(&psaux_mouse);
 #endif
        devfs_remove("input/mice");
-       class_simple_device_remove(MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + MOUSEDEV_MIX));
+       class_device_destroy(input_class,
+                       MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + MOUSEDEV_MIX));
        input_unregister_handler(&mousedev_handler);
 }
 
index d0afba85720be337f73b3beb4e1922979cf44c8f..50c63a155156a36e269ee8c40f6a8536a6bb3e08 100644 (file)
@@ -414,9 +414,9 @@ static struct input_handle *tsdev_connect(struct input_handler *handler,
                        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_simple_device_add(input_class,
-                               MKDEV(INPUT_MAJOR, TSDEV_MINOR_BASE + minor),
-                               dev->dev, "ts%d", minor);
+       class_device_create(input_class,
+                       MKDEV(INPUT_MAJOR, TSDEV_MINOR_BASE + minor),
+                       dev->dev, "ts%d", minor);
 
        return &tsdev->handle;
 }
@@ -426,7 +426,8 @@ static void tsdev_disconnect(struct input_handle *handle)
        struct tsdev *tsdev = handle->private;
        struct tsdev_list *list;
 
-       class_simple_device_remove(MKDEV(INPUT_MAJOR, TSDEV_MINOR_BASE + tsdev->minor));
+       class_device_destroy(input_class,
+                       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;
index 72731d7d189ee2be0f223e77d75799e18d5eb26c..9d9598ed760de2a7a4f2081f62dc41b11a6e81c8 100644 (file)
@@ -1015,7 +1015,7 @@ static inline void input_set_abs_params(struct input_dev *dev, int axis, int min
        dev->absbit[LONG(axis)] |= BIT(axis);
 }
 
-extern struct class_simple *input_class;
+extern struct class *input_class;
 
 #endif
 #endif