[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1207653576-12640-11-git-send-email-den@openvz.org>
Date: Tue, 8 Apr 2008 15:19:18 +0400
From: "Denis V. Lunev" <den@...nvz.org>
To: akpm@...ux-foundation.org
Cc: linux-kernel@...r.kernel.org, "Denis V. Lunev" <den@...nvz.org>
Subject: [PATCH 11/29] 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@...nvz.org>
---
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 920e578..23b7bc0 100644
--- a/sound/core/memalloc.c
+++ b/sound/core/memalloc.c
@@ -629,9 +629,8 @@ static const struct file_operations snd_mem_proc_fops = {
static int __init snd_mem_init(void)
{
#ifdef CONFIG_PROC_FS
- snd_mem_proc = create_proc_entry(SND_MEM_PROC_FILE, 0644, NULL);
- if (snd_mem_proc)
- snd_mem_proc->proc_fops = &snd_mem_proc_fops;
+ snd_mem_proc = proc_create(SND_MEM_PROC_FILE, 0644, NULL,
+ &snd_mem_proc_fops);
#endif
return 0;
}
--
1.5.3.rc5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists