aboutsummaryrefslogtreecommitdiffstats
path: root/net/irda/ircomm
diff options
context:
space:
mode:
authorWang Chen <wangchen@cn.fujitsu.com>2008-02-29 13:34:45 -0500
committerDavid S. Miller <davem@davemloft.net>2008-02-29 13:34:45 -0500
commit5e47879f493e14a017d1facefc601f43c477dbee (patch)
tree268397e6e7af11d05d929bdf10306fa16701e279 /net/irda/ircomm
parent0bc8c7bf9e7440500fe04f95d6cddc58ea023cd2 (diff)
[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>
Diffstat (limited to 'net/irda/ircomm')
-rw-r--r--net/irda/ircomm/ircomm_core.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/net/irda/ircomm/ircomm_core.c b/net/irda/ircomm/ircomm_core.c
index b825399fc160..6eef1f2a7553 100644
--- a/net/irda/ircomm/ircomm_core.c
+++ b/net/irda/ircomm/ircomm_core.c
@@ -76,9 +76,11 @@ static int __init ircomm_init(void)
76 76
77#ifdef CONFIG_PROC_FS 77#ifdef CONFIG_PROC_FS
78 { struct proc_dir_entry *ent; 78 { struct proc_dir_entry *ent;
79 ent = create_proc_entry("ircomm", 0, proc_irda); 79 ent = proc_create("ircomm", 0, proc_irda, &ircomm_proc_fops);
80 if (ent) 80 if (!ent) {
81 ent->proc_fops = &ircomm_proc_fops; 81 printk(KERN_ERR "ircomm_init: can't create /proc entry!\n");
82 return -ENODEV;
83 }
82 } 84 }
83#endif /* CONFIG_PROC_FS */ 85#endif /* CONFIG_PROC_FS */
84 86