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 | |
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')
-rw-r--r-- | drivers/input/evdev.c | 9 | ||||
-rw-r--r-- | drivers/input/input.c | 10 | ||||
-rw-r--r-- | drivers/input/joydev.c | 8 | ||||
-rw-r--r-- | drivers/input/mousedev.c | 16 | ||||
-rw-r--r-- | drivers/input/tsdev.c | 9 |
5 files changed, 28 insertions, 24 deletions
diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c index 17552a29978b..556264b43425 100644 --- a/drivers/input/evdev.c +++ b/drivers/input/evdev.c | |||
@@ -431,9 +431,9 @@ static struct input_handle *evdev_connect(struct input_handler *handler, struct | |||
431 | 431 | ||
432 | devfs_mk_cdev(MKDEV(INPUT_MAJOR, EVDEV_MINOR_BASE + minor), | 432 | devfs_mk_cdev(MKDEV(INPUT_MAJOR, EVDEV_MINOR_BASE + minor), |
433 | S_IFCHR|S_IRUGO|S_IWUSR, "input/event%d", minor); | 433 | S_IFCHR|S_IRUGO|S_IWUSR, "input/event%d", minor); |
434 | class_simple_device_add(input_class, | 434 | class_device_create(input_class, |
435 | MKDEV(INPUT_MAJOR, EVDEV_MINOR_BASE + minor), | 435 | MKDEV(INPUT_MAJOR, EVDEV_MINOR_BASE + minor), |
436 | dev->dev, "event%d", minor); | 436 | dev->dev, "event%d", minor); |
437 | 437 | ||
438 | return &evdev->handle; | 438 | return &evdev->handle; |
439 | } | 439 | } |
@@ -443,7 +443,8 @@ static void evdev_disconnect(struct input_handle *handle) | |||
443 | struct evdev *evdev = handle->private; | 443 | struct evdev *evdev = handle->private; |
444 | struct evdev_list *list; | 444 | struct evdev_list *list; |
445 | 445 | ||
446 | class_simple_device_remove(MKDEV(INPUT_MAJOR, EVDEV_MINOR_BASE + evdev->minor)); | 446 | class_device_destroy(input_class, |
447 | MKDEV(INPUT_MAJOR, EVDEV_MINOR_BASE + evdev->minor)); | ||
447 | devfs_remove("input/event%d", evdev->minor); | 448 | devfs_remove("input/event%d", evdev->minor); |
448 | evdev->exist = 0; | 449 | evdev->exist = 0; |
449 | 450 | ||
diff --git a/drivers/input/input.c b/drivers/input/input.c index 3385dd03abfc..83c77c990dda 100644 --- a/drivers/input/input.c +++ b/drivers/input/input.c | |||
@@ -702,13 +702,13 @@ static int __init input_proc_init(void) | |||
702 | static inline int input_proc_init(void) { return 0; } | 702 | static inline int input_proc_init(void) { return 0; } |
703 | #endif | 703 | #endif |
704 | 704 | ||
705 | struct class_simple *input_class; | 705 | struct class *input_class; |
706 | 706 | ||
707 | static int __init input_init(void) | 707 | static int __init input_init(void) |
708 | { | 708 | { |
709 | int retval = -ENOMEM; | 709 | int retval = -ENOMEM; |
710 | 710 | ||
711 | input_class = class_simple_create(THIS_MODULE, "input"); | 711 | input_class = class_create(THIS_MODULE, "input"); |
712 | if (IS_ERR(input_class)) | 712 | if (IS_ERR(input_class)) |
713 | return PTR_ERR(input_class); | 713 | return PTR_ERR(input_class); |
714 | input_proc_init(); | 714 | input_proc_init(); |
@@ -718,7 +718,7 @@ static int __init input_init(void) | |||
718 | remove_proc_entry("devices", proc_bus_input_dir); | 718 | remove_proc_entry("devices", proc_bus_input_dir); |
719 | remove_proc_entry("handlers", proc_bus_input_dir); | 719 | remove_proc_entry("handlers", proc_bus_input_dir); |
720 | remove_proc_entry("input", proc_bus); | 720 | remove_proc_entry("input", proc_bus); |
721 | class_simple_destroy(input_class); | 721 | class_destroy(input_class); |
722 | return retval; | 722 | return retval; |
723 | } | 723 | } |
724 | 724 | ||
@@ -728,7 +728,7 @@ static int __init input_init(void) | |||
728 | remove_proc_entry("handlers", proc_bus_input_dir); | 728 | remove_proc_entry("handlers", proc_bus_input_dir); |
729 | remove_proc_entry("input", proc_bus); | 729 | remove_proc_entry("input", proc_bus); |
730 | unregister_chrdev(INPUT_MAJOR, "input"); | 730 | unregister_chrdev(INPUT_MAJOR, "input"); |
731 | class_simple_destroy(input_class); | 731 | class_destroy(input_class); |
732 | } | 732 | } |
733 | return retval; | 733 | return retval; |
734 | } | 734 | } |
@@ -741,7 +741,7 @@ static void __exit input_exit(void) | |||
741 | 741 | ||
742 | devfs_remove("input"); | 742 | devfs_remove("input"); |
743 | unregister_chrdev(INPUT_MAJOR, "input"); | 743 | unregister_chrdev(INPUT_MAJOR, "input"); |
744 | class_simple_destroy(input_class); | 744 | class_destroy(input_class); |
745 | } | 745 | } |
746 | 746 | ||
747 | subsys_initcall(input_init); | 747 | subsys_initcall(input_init); |
diff --git a/drivers/input/joydev.c b/drivers/input/joydev.c index 627d343dfba1..39775fc380c7 100644 --- a/drivers/input/joydev.c +++ b/drivers/input/joydev.c | |||
@@ -452,9 +452,9 @@ static struct input_handle *joydev_connect(struct input_handler *handler, struct | |||
452 | 452 | ||
453 | devfs_mk_cdev(MKDEV(INPUT_MAJOR, JOYDEV_MINOR_BASE + minor), | 453 | devfs_mk_cdev(MKDEV(INPUT_MAJOR, JOYDEV_MINOR_BASE + minor), |
454 | S_IFCHR|S_IRUGO|S_IWUSR, "input/js%d", minor); | 454 | S_IFCHR|S_IRUGO|S_IWUSR, "input/js%d", minor); |
455 | class_simple_device_add(input_class, | 455 | class_device_create(input_class, |
456 | MKDEV(INPUT_MAJOR, JOYDEV_MINOR_BASE + minor), | 456 | MKDEV(INPUT_MAJOR, JOYDEV_MINOR_BASE + minor), |
457 | dev->dev, "js%d", minor); | 457 | dev->dev, "js%d", minor); |
458 | 458 | ||
459 | return &joydev->handle; | 459 | return &joydev->handle; |
460 | } | 460 | } |
@@ -464,7 +464,7 @@ static void joydev_disconnect(struct input_handle *handle) | |||
464 | struct joydev *joydev = handle->private; | 464 | struct joydev *joydev = handle->private; |
465 | struct joydev_list *list; | 465 | struct joydev_list *list; |
466 | 466 | ||
467 | class_simple_device_remove(MKDEV(INPUT_MAJOR, JOYDEV_MINOR_BASE + joydev->minor)); | 467 | class_device_destroy(input_class, MKDEV(INPUT_MAJOR, JOYDEV_MINOR_BASE + joydev->minor)); |
468 | devfs_remove("input/js%d", joydev->minor); | 468 | devfs_remove("input/js%d", joydev->minor); |
469 | joydev->exist = 0; | 469 | joydev->exist = 0; |
470 | 470 | ||
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 | ||
diff --git a/drivers/input/tsdev.c b/drivers/input/tsdev.c index d0afba85720b..50c63a155156 100644 --- a/drivers/input/tsdev.c +++ b/drivers/input/tsdev.c | |||
@@ -414,9 +414,9 @@ static struct input_handle *tsdev_connect(struct input_handler *handler, | |||
414 | S_IFCHR|S_IRUGO|S_IWUSR, "input/ts%d", minor); | 414 | S_IFCHR|S_IRUGO|S_IWUSR, "input/ts%d", minor); |
415 | devfs_mk_cdev(MKDEV(INPUT_MAJOR, TSDEV_MINOR_BASE + minor + TSDEV_MINORS/2), | 415 | devfs_mk_cdev(MKDEV(INPUT_MAJOR, TSDEV_MINOR_BASE + minor + TSDEV_MINORS/2), |
416 | S_IFCHR|S_IRUGO|S_IWUSR, "input/tsraw%d", minor); | 416 | S_IFCHR|S_IRUGO|S_IWUSR, "input/tsraw%d", minor); |
417 | class_simple_device_add(input_class, | 417 | class_device_create(input_class, |
418 | MKDEV(INPUT_MAJOR, TSDEV_MINOR_BASE + minor), | 418 | MKDEV(INPUT_MAJOR, TSDEV_MINOR_BASE + minor), |
419 | dev->dev, "ts%d", minor); | 419 | dev->dev, "ts%d", minor); |
420 | 420 | ||
421 | return &tsdev->handle; | 421 | return &tsdev->handle; |
422 | } | 422 | } |
@@ -426,7 +426,8 @@ static void tsdev_disconnect(struct input_handle *handle) | |||
426 | struct tsdev *tsdev = handle->private; | 426 | struct tsdev *tsdev = handle->private; |
427 | struct tsdev_list *list; | 427 | struct tsdev_list *list; |
428 | 428 | ||
429 | class_simple_device_remove(MKDEV(INPUT_MAJOR, TSDEV_MINOR_BASE + tsdev->minor)); | 429 | class_device_destroy(input_class, |
430 | MKDEV(INPUT_MAJOR, TSDEV_MINOR_BASE + tsdev->minor)); | ||
430 | devfs_remove("input/ts%d", tsdev->minor); | 431 | devfs_remove("input/ts%d", tsdev->minor); |
431 | devfs_remove("input/tsraw%d", tsdev->minor); | 432 | devfs_remove("input/tsraw%d", tsdev->minor); |
432 | tsdev->exist = 0; | 433 | tsdev->exist = 0; |