diff options
author | Denis V. Lunev <den@openvz.org> | 2008-04-29 04:02:35 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-29 11:06:22 -0400 |
commit | c7705f3449c7edd5c1744871097f93977227afc4 (patch) | |
tree | d2f121a4b1ae3ae458db76ec0210ea2172c31e5a /drivers/input | |
parent | 1b50221738108c438d5f25c7a043fb89e9e27044 (diff) |
drivers: use non-racy method for proc entries creation (2)
Use proc_create()/proc_create_data() to make sure that ->proc_fops and ->data
be setup before gluing PDE to main tree.
Signed-off-by: Denis V. Lunev <den@openvz.org>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Peter Osterlund <petero2@telia.com>
Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Cc: Dmitry Torokhov <dtor@mail.ru>
Cc: Neil Brown <neilb@suse.de>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/input.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/input/input.c b/drivers/input/input.c index 11426604d8a2..27006fc18305 100644 --- a/drivers/input/input.c +++ b/drivers/input/input.c | |||
@@ -904,20 +904,16 @@ static int __init input_proc_init(void) | |||
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); |