diff options
Diffstat (limited to 'drivers/input/input.c')
-rw-r--r-- | drivers/input/input.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/drivers/input/input.c b/drivers/input/input.c index f02c242c3114..27006fc18305 100644 --- a/drivers/input/input.c +++ b/drivers/input/input.c | |||
@@ -898,30 +898,26 @@ static int __init input_proc_init(void) | |||
898 | { | 898 | { |
899 | struct proc_dir_entry *entry; | 899 | struct proc_dir_entry *entry; |
900 | 900 | ||
901 | proc_bus_input_dir = proc_mkdir("input", proc_bus); | 901 | proc_bus_input_dir = proc_mkdir("bus/input", NULL); |
902 | if (!proc_bus_input_dir) | 902 | if (!proc_bus_input_dir) |
903 | return -ENOMEM; | 903 | return -ENOMEM; |
904 | 904 | ||
905 | proc_bus_input_dir->owner = THIS_MODULE; | 905 | proc_bus_input_dir->owner = THIS_MODULE; |
906 | 906 | ||
907 | entry = create_proc_entry("devices", 0, proc_bus_input_dir); | 907 | entry = proc_create("devices", 0, proc_bus_input_dir, |
908 | &input_devices_fileops); | ||
908 | if (!entry) | 909 | if (!entry) |
909 | goto fail1; | 910 | goto fail1; |
910 | 911 | ||
911 | entry->owner = THIS_MODULE; | 912 | entry = proc_create("handlers", 0, proc_bus_input_dir, |
912 | entry->proc_fops = &input_devices_fileops; | 913 | &input_handlers_fileops); |
913 | |||
914 | entry = create_proc_entry("handlers", 0, proc_bus_input_dir); | ||
915 | if (!entry) | 914 | if (!entry) |
916 | goto fail2; | 915 | goto fail2; |
917 | 916 | ||
918 | entry->owner = THIS_MODULE; | ||
919 | entry->proc_fops = &input_handlers_fileops; | ||
920 | |||
921 | return 0; | 917 | return 0; |
922 | 918 | ||
923 | fail2: remove_proc_entry("devices", proc_bus_input_dir); | 919 | fail2: remove_proc_entry("devices", proc_bus_input_dir); |
924 | fail1: remove_proc_entry("input", proc_bus); | 920 | fail1: remove_proc_entry("bus/input", NULL); |
925 | return -ENOMEM; | 921 | return -ENOMEM; |
926 | } | 922 | } |
927 | 923 | ||
@@ -929,7 +925,7 @@ static void input_proc_exit(void) | |||
929 | { | 925 | { |
930 | remove_proc_entry("devices", proc_bus_input_dir); | 926 | remove_proc_entry("devices", proc_bus_input_dir); |
931 | remove_proc_entry("handlers", proc_bus_input_dir); | 927 | remove_proc_entry("handlers", proc_bus_input_dir); |
932 | remove_proc_entry("input", proc_bus); | 928 | remove_proc_entry("bus/input", NULL); |
933 | } | 929 | } |
934 | 930 | ||
935 | #else /* !CONFIG_PROC_FS */ | 931 | #else /* !CONFIG_PROC_FS */ |