提交 6f1c86ec 编写于 作者: D Denis V. Lunev 提交者: Linus Torvalds

parisc: use non-racy method for /proc/pcxl_dma creation

Use proc_create() to make sure that ->proc_fops be setup before gluing PDE to
main tree.
Signed-off-by: NDenis V. Lunev <den@openvz.org>
Cc: Kyle McMartin <kyle@parisc-linux.org>
Cc: Matthew Wilcox <matthew@wil.cx>
Cc: Grant Grundler <grundler@parisc-linux.org>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 e2363768
...@@ -397,10 +397,9 @@ pcxl_dma_init(void) ...@@ -397,10 +397,9 @@ pcxl_dma_init(void)
"pcxl_dma_init: Unable to create gsc /proc dir entry\n"); "pcxl_dma_init: Unable to create gsc /proc dir entry\n");
else { else {
struct proc_dir_entry* ent; struct proc_dir_entry* ent;
ent = create_proc_entry("pcxl_dma", 0, proc_gsc_root); ent = proc_create("pcxl_dma", 0, proc_gsc_root,
if (ent) &proc_pcxl_dma_ops);
ent->proc_fops = &proc_pcxl_dma_ops; if (!ent)
else
printk(KERN_WARNING printk(KERN_WARNING
"pci-dma.c: Unable to create pcxl_dma /proc entry.\n"); "pci-dma.c: Unable to create pcxl_dma /proc entry.\n");
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册