aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/input.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/input/input.c')
-rw-r--r--drivers/input/input.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/drivers/input/input.c b/drivers/input/input.c
index 0d570cf92dc2..5c9044dbf00e 100644
--- a/drivers/input/input.c
+++ b/drivers/input/input.c
@@ -39,7 +39,6 @@ EXPORT_SYMBOL(input_close_device);
39EXPORT_SYMBOL(input_accept_process); 39EXPORT_SYMBOL(input_accept_process);
40EXPORT_SYMBOL(input_flush_device); 40EXPORT_SYMBOL(input_flush_device);
41EXPORT_SYMBOL(input_event); 41EXPORT_SYMBOL(input_event);
42EXPORT_SYMBOL(input_class);
43EXPORT_SYMBOL_GPL(input_dev_class); 42EXPORT_SYMBOL_GPL(input_dev_class);
44 43
45#define INPUT_DEVICES 256 44#define INPUT_DEVICES 256
@@ -927,8 +926,6 @@ static struct file_operations input_fops = {
927 .open = input_open_file, 926 .open = input_open_file,
928}; 927};
929 928
930struct class *input_class;
931
932static int __init input_init(void) 929static int __init input_init(void)
933{ 930{
934 int err; 931 int err;
@@ -939,27 +936,19 @@ static int __init input_init(void)
939 return err; 936 return err;
940 } 937 }
941 938
942 input_class = class_create(THIS_MODULE, "input");
943 if (IS_ERR(input_class)) {
944 printk(KERN_ERR "input: unable to register input class\n");
945 err = PTR_ERR(input_class);
946 goto fail1;
947 }
948
949 err = input_proc_init(); 939 err = input_proc_init();
950 if (err) 940 if (err)
951 goto fail2; 941 goto fail1;
952 942
953 err = register_chrdev(INPUT_MAJOR, "input", &input_fops); 943 err = register_chrdev(INPUT_MAJOR, "input", &input_fops);
954 if (err) { 944 if (err) {
955 printk(KERN_ERR "input: unable to register char major %d", INPUT_MAJOR); 945 printk(KERN_ERR "input: unable to register char major %d", INPUT_MAJOR);
956 goto fail3; 946 goto fail2;
957 } 947 }
958 948
959 return 0; 949 return 0;
960 950
961 fail3: input_proc_exit(); 951 fail2: input_proc_exit();
962 fail2: class_destroy(input_class);
963 fail1: class_unregister(&input_dev_class); 952 fail1: class_unregister(&input_dev_class);
964 return err; 953 return err;
965} 954}
@@ -968,7 +957,6 @@ static void __exit input_exit(void)
968{ 957{
969 input_proc_exit(); 958 input_proc_exit();
970 unregister_chrdev(INPUT_MAJOR, "input"); 959 unregister_chrdev(INPUT_MAJOR, "input");
971 class_destroy(input_class);
972 class_unregister(&input_dev_class); 960 class_unregister(&input_dev_class);
973} 961}
974 962