Commit 1235686f6e67cf30c460eb77d90a6cb4be57b92f
Committed by
Greg Kroah-Hartman
1 parent
7fe845d11a
Exists in
master
and in
39 other branches
[PATCH] INPUT: move to use the new class code, instead of class_simple
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Showing 6 changed files with 29 additions and 25 deletions Side-by-side Diff
drivers/input/evdev.c
... | ... | @@ -431,9 +431,9 @@ |
431 | 431 | |
432 | 432 | devfs_mk_cdev(MKDEV(INPUT_MAJOR, EVDEV_MINOR_BASE + minor), |
433 | 433 | S_IFCHR|S_IRUGO|S_IWUSR, "input/event%d", minor); |
434 | - class_simple_device_add(input_class, | |
435 | - MKDEV(INPUT_MAJOR, EVDEV_MINOR_BASE + minor), | |
436 | - dev->dev, "event%d", minor); | |
434 | + class_device_create(input_class, | |
435 | + MKDEV(INPUT_MAJOR, EVDEV_MINOR_BASE + minor), | |
436 | + dev->dev, "event%d", minor); | |
437 | 437 | |
438 | 438 | return &evdev->handle; |
439 | 439 | } |
... | ... | @@ -443,7 +443,8 @@ |
443 | 443 | struct evdev *evdev = handle->private; |
444 | 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 | 448 | devfs_remove("input/event%d", evdev->minor); |
448 | 449 | evdev->exist = 0; |
449 | 450 |
drivers/input/input.c
... | ... | @@ -702,13 +702,13 @@ |
702 | 702 | static inline int input_proc_init(void) { return 0; } |
703 | 703 | #endif |
704 | 704 | |
705 | -struct class_simple *input_class; | |
705 | +struct class *input_class; | |
706 | 706 | |
707 | 707 | static int __init input_init(void) |
708 | 708 | { |
709 | 709 | int retval = -ENOMEM; |
710 | 710 | |
711 | - input_class = class_simple_create(THIS_MODULE, "input"); | |
711 | + input_class = class_create(THIS_MODULE, "input"); | |
712 | 712 | if (IS_ERR(input_class)) |
713 | 713 | return PTR_ERR(input_class); |
714 | 714 | input_proc_init(); |
... | ... | @@ -718,7 +718,7 @@ |
718 | 718 | remove_proc_entry("devices", proc_bus_input_dir); |
719 | 719 | remove_proc_entry("handlers", proc_bus_input_dir); |
720 | 720 | remove_proc_entry("input", proc_bus); |
721 | - class_simple_destroy(input_class); | |
721 | + class_destroy(input_class); | |
722 | 722 | return retval; |
723 | 723 | } |
724 | 724 | |
... | ... | @@ -728,7 +728,7 @@ |
728 | 728 | remove_proc_entry("handlers", proc_bus_input_dir); |
729 | 729 | remove_proc_entry("input", proc_bus); |
730 | 730 | unregister_chrdev(INPUT_MAJOR, "input"); |
731 | - class_simple_destroy(input_class); | |
731 | + class_destroy(input_class); | |
732 | 732 | } |
733 | 733 | return retval; |
734 | 734 | } |
... | ... | @@ -741,7 +741,7 @@ |
741 | 741 | |
742 | 742 | devfs_remove("input"); |
743 | 743 | unregister_chrdev(INPUT_MAJOR, "input"); |
744 | - class_simple_destroy(input_class); | |
744 | + class_destroy(input_class); | |
745 | 745 | } |
746 | 746 | |
747 | 747 | subsys_initcall(input_init); |
drivers/input/joydev.c
... | ... | @@ -452,9 +452,9 @@ |
452 | 452 | |
453 | 453 | devfs_mk_cdev(MKDEV(INPUT_MAJOR, JOYDEV_MINOR_BASE + minor), |
454 | 454 | S_IFCHR|S_IRUGO|S_IWUSR, "input/js%d", minor); |
455 | - class_simple_device_add(input_class, | |
456 | - MKDEV(INPUT_MAJOR, JOYDEV_MINOR_BASE + minor), | |
457 | - dev->dev, "js%d", minor); | |
455 | + class_device_create(input_class, | |
456 | + MKDEV(INPUT_MAJOR, JOYDEV_MINOR_BASE + minor), | |
457 | + dev->dev, "js%d", minor); | |
458 | 458 | |
459 | 459 | return &joydev->handle; |
460 | 460 | } |
... | ... | @@ -464,7 +464,7 @@ |
464 | 464 | struct joydev *joydev = handle->private; |
465 | 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 | 468 | devfs_remove("input/js%d", joydev->minor); |
469 | 469 | joydev->exist = 0; |
470 | 470 |
drivers/input/mousedev.c
... | ... | @@ -647,9 +647,9 @@ |
647 | 647 | |
648 | 648 | devfs_mk_cdev(MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + minor), |
649 | 649 | S_IFCHR|S_IRUGO|S_IWUSR, "input/mouse%d", minor); |
650 | - class_simple_device_add(input_class, | |
651 | - MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + minor), | |
652 | - dev->dev, "mouse%d", minor); | |
650 | + class_device_create(input_class, | |
651 | + MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + minor), | |
652 | + dev->dev, "mouse%d", minor); | |
653 | 653 | |
654 | 654 | return &mousedev->handle; |
655 | 655 | } |
... | ... | @@ -659,7 +659,8 @@ |
659 | 659 | struct mousedev *mousedev = handle->private; |
660 | 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 | 664 | devfs_remove("input/mouse%d", mousedev->minor); |
664 | 665 | mousedev->exist = 0; |
665 | 666 | |
... | ... | @@ -735,8 +736,8 @@ |
735 | 736 | |
736 | 737 | devfs_mk_cdev(MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + MOUSEDEV_MIX), |
737 | 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 | - NULL, "mice"); | |
739 | + class_device_create(input_class, | |
740 | + MKDEV(INPUT_MAJOR, MOUSEDEV_MINOR_BASE + MOUSEDEV_MIX), NULL, "mice"); | |
740 | 741 | |
741 | 742 | #ifdef CONFIG_INPUT_MOUSEDEV_PSAUX |
742 | 743 | if (!(psaux_registered = !misc_register(&psaux_mouse))) |
... | ... | @@ -755,7 +756,8 @@ |
755 | 756 | misc_deregister(&psaux_mouse); |
756 | 757 | #endif |
757 | 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 | 761 | input_unregister_handler(&mousedev_handler); |
760 | 762 | } |
761 | 763 |
drivers/input/tsdev.c
... | ... | @@ -414,9 +414,9 @@ |
414 | 414 | S_IFCHR|S_IRUGO|S_IWUSR, "input/ts%d", minor); |
415 | 415 | devfs_mk_cdev(MKDEV(INPUT_MAJOR, TSDEV_MINOR_BASE + minor + TSDEV_MINORS/2), |
416 | 416 | S_IFCHR|S_IRUGO|S_IWUSR, "input/tsraw%d", minor); |
417 | - class_simple_device_add(input_class, | |
418 | - MKDEV(INPUT_MAJOR, TSDEV_MINOR_BASE + minor), | |
419 | - dev->dev, "ts%d", minor); | |
417 | + class_device_create(input_class, | |
418 | + MKDEV(INPUT_MAJOR, TSDEV_MINOR_BASE + minor), | |
419 | + dev->dev, "ts%d", minor); | |
420 | 420 | |
421 | 421 | return &tsdev->handle; |
422 | 422 | } |
... | ... | @@ -426,7 +426,8 @@ |
426 | 426 | struct tsdev *tsdev = handle->private; |
427 | 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 | 431 | devfs_remove("input/ts%d", tsdev->minor); |
431 | 432 | devfs_remove("input/tsraw%d", tsdev->minor); |
432 | 433 | tsdev->exist = 0; |