[IRDA]: Use proc_create() to setup ->proc_fops first
Use proc_create() to make sure that ->proc_fops be setup before gluing PDE to main tree. Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
0bc8c7bf9e
commit
5e47879f49
@@ -76,9 +76,11 @@ static int __init ircomm_init(void)
|
||||
|
||||
#ifdef CONFIG_PROC_FS
|
||||
{ struct proc_dir_entry *ent;
|
||||
ent = create_proc_entry("ircomm", 0, proc_irda);
|
||||
if (ent)
|
||||
ent->proc_fops = &ircomm_proc_fops;
|
||||
ent = proc_create("ircomm", 0, proc_irda, &ircomm_proc_fops);
|
||||
if (!ent) {
|
||||
printk(KERN_ERR "ircomm_init: can't create /proc entry!\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
}
|
||||
#endif /* CONFIG_PROC_FS */
|
||||
|
||||
|
Reference in New Issue
Block a user