diff options
author | Denis V. Lunev <den@openvz.org> | 2008-04-29 04:02:13 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-04-29 11:06:20 -0400 |
commit | 7bf4e6d3e948e38893c718fa9c5bd0dfbfa49670 (patch) | |
tree | f7bec9aa61e1d118cb7b53c24a10172a7be042d9 | |
parent | 3d71f86f4dfccd749e4421f10301f3f3b31da88a (diff) |
sound: use non-racy method for /proc/driver/snd-page-alloc creation
Use proc_create() to make sure that ->proc_fops be setup before gluing PDE to
main tree.
Signed-off-by: Denis V. Lunev <den@openvz.org>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Jaroslav Kysela <perex@suse.cz>
Cc: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | sound/core/memalloc.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sound/core/memalloc.c b/sound/core/memalloc.c index 920e5780c228..23b7bc02728b 100644 --- a/sound/core/memalloc.c +++ b/sound/core/memalloc.c | |||
@@ -629,9 +629,8 @@ static const struct file_operations snd_mem_proc_fops = { | |||
629 | static int __init snd_mem_init(void) | 629 | static int __init snd_mem_init(void) |
630 | { | 630 | { |
631 | #ifdef CONFIG_PROC_FS | 631 | #ifdef CONFIG_PROC_FS |
632 | snd_mem_proc = create_proc_entry(SND_MEM_PROC_FILE, 0644, NULL); | 632 | snd_mem_proc = proc_create(SND_MEM_PROC_FILE, 0644, NULL, |
633 | if (snd_mem_proc) | 633 | &snd_mem_proc_fops); |
634 | snd_mem_proc->proc_fops = &snd_mem_proc_fops; | ||
635 | #endif | 634 | #endif |
636 | return 0; | 635 | return 0; |
637 | } | 636 | } |