diff options
author | gregkh@suse.de <gregkh@suse.de> | 2005-03-15 17:26:30 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2005-06-20 18:15:04 -0400 |
commit | 1235686f6e67cf30c460eb77d90a6cb4be57b92f (patch) | |
tree | c7ef368a38c8e0c64e09d9e0e8a2a93392a1732c /drivers/input/mousedev.c | |
parent | 7fe845d11ad1b4aac098d40c55275569e143c483 (diff) |
[PATCH] INPUT: move to use the new class code, instead of class_simple
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/input/mousedev.c')
-rw-r--r-- | drivers/input/mousedev.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/input/mousedev.c b/drivers/input/mousedev.c index 96fb9870834a..062848ac7e6b 100644 --- a/drivers/input/mousedev.c +++ b/drivers/input/mousedev.c | |||
@@ -647,9 +647,9 @@ static struct input_handle *mousedev_connect(struct input_handler *handler, stru | |||
647 | 647 | ||
648 | devfs_mk_cdev(MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + minor), | 648 | devfs_mk_cdev(MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + minor), |
649 | S_IFCHR|S_IRUGO|S_IWUSR, "input/mouse%d", minor); | 649 | S_IFCHR|S_IRUGO|S_IWUSR, "input/mouse%d", minor); |
650 | class_simple_device_add(input_class, | 650 | class_device_create(input_class, |
651 | MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + minor), | 651 | MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + minor), |
652 | dev->dev, "mouse%d", minor); | 652 | dev->dev, "mouse%d", minor); |
653 | 653 | ||
654 | return &mousedev->handle; | 654 | return &mousedev->handle; |
655 | } | 655 | } |
@@ -659,7 +659,8 @@ static void mousedev_disconnect(struct input_handle *handle) | |||
659 | struct mousedev *mousedev = handle->private; | 659 | struct mousedev *mousedev = handle->private; |
660 | struct mousedev_list *list; | 660 | struct mousedev_list *list; |
661 | 661 | ||
662 | class_simple_device_remove(MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + mousedev->minor)); | 662 | class_device_destroy(input_class, |
663 | MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + mousedev->minor)); | ||
663 | devfs_remove("input/mouse%d", mousedev->minor); | 664 | devfs_remove("input/mouse%d", mousedev->minor); |
664 | mousedev->exist = 0; | 665 | mousedev->exist = 0; |
665 | 666 | ||
@@ -735,8 +736,8 @@ static int __init mousedev_init(void) | |||
735 | 736 | ||
736 | devfs_mk_cdev(MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + MOUSEDEV_MIX), | 737 | devfs_mk_cdev(MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + MOUSEDEV_MIX), |
737 | S_IFCHR|S_IRUGO|S_IWUSR, "input/mice"); | 738 | S_IFCHR|S_IRUGO|S_IWUSR, "input/mice"); |
738 | class_simple_device_add(input_class, MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + MOUSEDEV_MIX), | 739 | class_device_create(input_class, |
739 | NULL, "mice"); | 740 | MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + MOUSEDEV_MIX), NULL, "mice"); |
740 | 741 | ||
741 | #ifdef CONFIG_INPUT_MOUSEDEV_PSAUX | 742 | #ifdef CONFIG_INPUT_MOUSEDEV_PSAUX |
742 | if (!(psaux_registered = !misc_register(&psaux_mouse))) | 743 | if (!(psaux_registered = !misc_register(&psaux_mouse))) |
@@ -755,7 +756,8 @@ static void __exit mousedev_exit(void) | |||
755 | misc_deregister(&psaux_mouse); | 756 | misc_deregister(&psaux_mouse); |
756 | #endif | 757 | #endif |
757 | devfs_remove("input/mice"); | 758 | devfs_remove("input/mice"); |
758 | class_simple_device_remove(MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + MOUSEDEV_MIX)); | 759 | class_device_destroy(input_class, |
760 | MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + MOUSEDEV_MIX)); | ||
759 | input_unregister_handler(&mousedev_handler); | 761 | input_unregister_handler(&mousedev_handler); |
760 | } | 762 | } |
761 | 763 | ||