diff options
author | Wang Chen <wangchen@cn.fujitsu.com> | 2008-02-29 13:34:45 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-02-29 13:34:45 -0500 |
commit | 5e47879f493e14a017d1facefc601f43c477dbee (patch) | |
tree | 268397e6e7af11d05d929bdf10306fa16701e279 /net/irda/irlan | |
parent | 0bc8c7bf9e7440500fe04f95d6cddc58ea023cd2 (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/irlan')
-rw-r--r-- | net/irda/irlan/irlan_common.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/net/irda/irlan/irlan_common.c b/net/irda/irlan/irlan_common.c index a4b56e25a917..1eb4bbcb1c9e 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) | |||
128 | 128 | ||
129 | #ifdef CONFIG_PROC_FS | 129 | #ifdef CONFIG_PROC_FS |
130 | { struct proc_dir_entry *proc; | 130 | { struct proc_dir_entry *proc; |
131 | proc = create_proc_entry("irlan", 0, proc_irda); | 131 | proc = proc_create("irlan", 0, proc_irda, &irlan_fops); |
132 | if (!proc) { | 132 | if (!proc) { |
133 | printk(KERN_ERR "irlan_init: can't create /proc entry!\n"); | 133 | printk(KERN_ERR "irlan_init: can't create /proc entry!\n"); |
134 | return -ENODEV; | 134 | return -ENODEV; |
135 | } | 135 | } |
136 | |||
137 | proc->proc_fops = &irlan_fops; | ||
138 | } | 136 | } |
139 | #endif /* CONFIG_PROC_FS */ | 137 | #endif /* CONFIG_PROC_FS */ |
140 | 138 | ||