mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-09 16:12:21 +00:00
[PATCH] INPUT: move to use the new class code, instead of class_simple
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
7fe845d11a
commit
1235686f6e
6 changed files with 29 additions and 25 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue