From 5e47879f493e14a017d1facefc601f43c477dbee Mon Sep 17 00:00:00 2001 From: Wang Chen Date: Fri, 29 Feb 2008 10:34:45 -0800 Subject: [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 Signed-off-by: David S. Miller --- net/irda/irlan/irlan_common.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'net/irda/irlan') diff --git a/net/irda/irlan/irlan_common.c b/net/irda/irlan/irlan_common.c index a4b56e2..1eb4bbc 100644 --- a/net/irda/irlan/irlan_common.c +++ b/net/irda/irlan/irlan_common.c @@ -128,13 +128,11 @@ static int __init irlan_init(void) #ifdef CONFIG_PROC_FS { struct proc_dir_entry *proc; - proc = create_proc_entry("irlan", 0, proc_irda); + proc = proc_create("irlan", 0, proc_irda, &irlan_fops); if (!proc) { printk(KERN_ERR "irlan_init: can't create /proc entry!\n"); return -ENODEV; } - - proc->proc_fops = &irlan_fops; } #endif /* CONFIG_PROC_FS */ -- cgit v1.1