Commit 1235686f authored by gregkh@suse.de's avatar gregkh@suse.de Committed by Greg Kroah-Hartman

[PATCH] INPUT: move to use the new class code, instead of class_simple

Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 7fe845d1
...@@ -431,7 +431,7 @@ static struct input_handle *evdev_connect(struct input_handler *handler, struct ...@@ -431,7 +431,7 @@ static struct input_handle *evdev_connect(struct input_handler *handler, struct
devfs_mk_cdev(MKDEV(INPUT_MAJOR, EVDEV_MINOR_BASE + minor), devfs_mk_cdev(MKDEV(INPUT_MAJOR, EVDEV_MINOR_BASE + minor),
S_IFCHR|S_IRUGO|S_IWUSR, "input/event%d", minor); S_IFCHR|S_IRUGO|S_IWUSR, "input/event%d", minor);
class_simple_device_add(input_class, class_device_create(input_class,
MKDEV(INPUT_MAJOR, EVDEV_MINOR_BASE + minor), MKDEV(INPUT_MAJOR, EVDEV_MINOR_BASE + minor),
dev->dev, "event%d", minor); dev->dev, "event%d", minor);
...@@ -443,7 +443,8 @@ static void evdev_disconnect(struct input_handle *handle) ...@@ -443,7 +443,8 @@ static void evdev_disconnect(struct input_handle *handle)
struct evdev *evdev = handle->private; struct evdev *evdev = handle->private;
struct evdev_list *list; 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); devfs_remove("input/event%d", evdev->minor);
evdev->exist = 0; evdev->exist = 0;
......
...@@ -702,13 +702,13 @@ static int __init input_proc_init(void) ...@@ -702,13 +702,13 @@ static int __init input_proc_init(void)
static inline int input_proc_init(void) { return 0; } static inline int input_proc_init(void) { return 0; }
#endif #endif
struct class_simple *input_class; struct class *input_class;
static int __init input_init(void) static int __init input_init(void)
{ {
int retval = -ENOMEM; int retval = -ENOMEM;
input_class = class_simple_create(THIS_MODULE, "input"); input_class = class_create(THIS_MODULE, "input");
if (IS_ERR(input_class)) if (IS_ERR(input_class))
return PTR_ERR(input_class); return PTR_ERR(input_class);
input_proc_init(); input_proc_init();
...@@ -718,7 +718,7 @@ static int __init input_init(void) ...@@ -718,7 +718,7 @@ static int __init input_init(void)
remove_proc_entry("devices", proc_bus_input_dir); remove_proc_entry("devices", proc_bus_input_dir);
remove_proc_entry("handlers", proc_bus_input_dir); remove_proc_entry("handlers", proc_bus_input_dir);
remove_proc_entry("input", proc_bus); remove_proc_entry("input", proc_bus);
class_simple_destroy(input_class); class_destroy(input_class);
return retval; return retval;
} }
...@@ -728,7 +728,7 @@ static int __init input_init(void) ...@@ -728,7 +728,7 @@ static int __init input_init(void)
remove_proc_entry("handlers", proc_bus_input_dir); remove_proc_entry("handlers", proc_bus_input_dir);
remove_proc_entry("input", proc_bus); remove_proc_entry("input", proc_bus);
unregister_chrdev(INPUT_MAJOR, "input"); unregister_chrdev(INPUT_MAJOR, "input");
class_simple_destroy(input_class); class_destroy(input_class);
} }
return retval; return retval;
} }
...@@ -741,7 +741,7 @@ static void __exit input_exit(void) ...@@ -741,7 +741,7 @@ static void __exit input_exit(void)
devfs_remove("input"); devfs_remove("input");
unregister_chrdev(INPUT_MAJOR, "input"); unregister_chrdev(INPUT_MAJOR, "input");
class_simple_destroy(input_class); class_destroy(input_class);
} }
subsys_initcall(input_init); subsys_initcall(input_init);
......
...@@ -452,7 +452,7 @@ static struct input_handle *joydev_connect(struct input_handler *handler, struct ...@@ -452,7 +452,7 @@ static struct input_handle *joydev_connect(struct input_handler *handler, struct
devfs_mk_cdev(MKDEV(INPUT_MAJOR, JOYDEV_MINOR_BASE + minor), devfs_mk_cdev(MKDEV(INPUT_MAJOR, JOYDEV_MINOR_BASE + minor),
S_IFCHR|S_IRUGO|S_IWUSR, "input/js%d", minor); S_IFCHR|S_IRUGO|S_IWUSR, "input/js%d", minor);
class_simple_device_add(input_class, class_device_create(input_class,
MKDEV(INPUT_MAJOR, JOYDEV_MINOR_BASE + minor), MKDEV(INPUT_MAJOR, JOYDEV_MINOR_BASE + minor),
dev->dev, "js%d", minor); dev->dev, "js%d", minor);
...@@ -464,7 +464,7 @@ static void joydev_disconnect(struct input_handle *handle) ...@@ -464,7 +464,7 @@ static void joydev_disconnect(struct input_handle *handle)
struct joydev *joydev = handle->private; struct joydev *joydev = handle->private;
struct joydev_list *list; 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); devfs_remove("input/js%d", joydev->minor);
joydev->exist = 0; joydev->exist = 0;
......
...@@ -647,7 +647,7 @@ static struct input_handle *mousedev_connect(struct input_handler *handler, stru ...@@ -647,7 +647,7 @@ static struct input_handle *mousedev_connect(struct input_handler *handler, stru
devfs_mk_cdev(MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + minor), devfs_mk_cdev(MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + minor),
S_IFCHR|S_IRUGO|S_IWUSR, "input/mouse%d", minor); S_IFCHR|S_IRUGO|S_IWUSR, "input/mouse%d", minor);
class_simple_device_add(input_class, class_device_create(input_class,
MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + minor), MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + minor),
dev->dev, "mouse%d", minor); dev->dev, "mouse%d", minor);
...@@ -659,7 +659,8 @@ static void mousedev_disconnect(struct input_handle *handle) ...@@ -659,7 +659,8 @@ static void mousedev_disconnect(struct input_handle *handle)
struct mousedev *mousedev = handle->private; struct mousedev *mousedev = handle->private;
struct mousedev_list *list; 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); devfs_remove("input/mouse%d", mousedev->minor);
mousedev->exist = 0; mousedev->exist = 0;
...@@ -735,8 +736,8 @@ static int __init mousedev_init(void) ...@@ -735,8 +736,8 @@ static int __init mousedev_init(void)
devfs_mk_cdev(MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + MOUSEDEV_MIX), devfs_mk_cdev(MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + MOUSEDEV_MIX),
S_IFCHR|S_IRUGO|S_IWUSR, "input/mice"); S_IFCHR|S_IRUGO|S_IWUSR, "input/mice");
class_simple_device_add(input_class, MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + MOUSEDEV_MIX), class_device_create(input_class,
NULL, "mice"); MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + MOUSEDEV_MIX), NULL, "mice");
#ifdef CONFIG_INPUT_MOUSEDEV_PSAUX #ifdef CONFIG_INPUT_MOUSEDEV_PSAUX
if (!(psaux_registered = !misc_register(&psaux_mouse))) if (!(psaux_registered = !misc_register(&psaux_mouse)))
...@@ -755,7 +756,8 @@ static void __exit mousedev_exit(void) ...@@ -755,7 +756,8 @@ static void __exit mousedev_exit(void)
misc_deregister(&psaux_mouse); misc_deregister(&psaux_mouse);
#endif #endif
devfs_remove("input/mice"); 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); input_unregister_handler(&mousedev_handler);
} }
......
...@@ -414,7 +414,7 @@ static struct input_handle *tsdev_connect(struct input_handler *handler, ...@@ -414,7 +414,7 @@ static struct input_handle *tsdev_connect(struct input_handler *handler,
S_IFCHR|S_IRUGO|S_IWUSR, "input/ts%d", minor); S_IFCHR|S_IRUGO|S_IWUSR, "input/ts%d", minor);
devfs_mk_cdev(MKDEV(INPUT_MAJOR, TSDEV_MINOR_BASE + minor + TSDEV_MINORS/2), devfs_mk_cdev(MKDEV(INPUT_MAJOR, TSDEV_MINOR_BASE + minor + TSDEV_MINORS/2),
S_IFCHR|S_IRUGO|S_IWUSR, "input/tsraw%d", minor); S_IFCHR|S_IRUGO|S_IWUSR, "input/tsraw%d", minor);
class_simple_device_add(input_class, class_device_create(input_class,
MKDEV(INPUT_MAJOR, TSDEV_MINOR_BASE + minor), MKDEV(INPUT_MAJOR, TSDEV_MINOR_BASE + minor),
dev->dev, "ts%d", minor); dev->dev, "ts%d", minor);
...@@ -426,7 +426,8 @@ static void tsdev_disconnect(struct input_handle *handle) ...@@ -426,7 +426,8 @@ static void tsdev_disconnect(struct input_handle *handle)
struct tsdev *tsdev = handle->private; struct tsdev *tsdev = handle->private;
struct tsdev_list *list; 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/ts%d", tsdev->minor);
devfs_remove("input/tsraw%d", tsdev->minor); devfs_remove("input/tsraw%d", tsdev->minor);
tsdev->exist = 0; tsdev->exist = 0;
......
...@@ -1015,7 +1015,7 @@ static inline void input_set_abs_params(struct input_dev *dev, int axis, int min ...@@ -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); dev->absbit[LONG(axis)] |= BIT(axis);
} }
extern struct class_simple *input_class; extern struct class *input_class;
#endif #endif
#endif #endif
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