aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWang Chen <wangchen@cn.fujitsu.com>2008-02-28 15:53:32 -0500
committerDavid S. Miller <davem@davemloft.net>2008-02-28 15:53:32 -0500
commited2b5b474e853fe2f9a9988f2871051291779d90 (patch)
tree9b96f80c2bc9f86d8ff77b86e420e2d852fdca25
parent4d9d2cb026c756318965e2d9874d4695d9ebd4f6 (diff)
[APPLETALK]: Use proc_create() to setup ->proc_fops first
As Davem mentioned in his recently patch (d9595a7b9c777d45a74774f1428c263a0a47f4c0) that the procfs visibility should occur after the ->proc_fops are setup. And also, Alexey provide proc_create() to make sure that ->proc_fops is setup before gluing PDE to main tree. We use proc_create(). Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/appletalk/atalk_proc.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/net/appletalk/atalk_proc.c b/net/appletalk/atalk_proc.c
index 8e8dcfd532db..162199a2d74f 100644
--- a/net/appletalk/atalk_proc.c
+++ b/net/appletalk/atalk_proc.c
@@ -283,25 +283,24 @@ int __init atalk_proc_init(void)
283 goto out; 283 goto out;
284 atalk_proc_dir->owner = THIS_MODULE; 284 atalk_proc_dir->owner = THIS_MODULE;
285 285
286 p = create_proc_entry("interface", S_IRUGO, atalk_proc_dir); 286 p = proc_create("interface", S_IRUGO, atalk_proc_dir,
287 &atalk_seq_interface_fops);
287 if (!p) 288 if (!p)
288 goto out_interface; 289 goto out_interface;
289 p->proc_fops = &atalk_seq_interface_fops;
290 290
291 p = create_proc_entry("route", S_IRUGO, atalk_proc_dir); 291 p = proc_create("route", S_IRUGO, atalk_proc_dir,
292 &atalk_seq_route_fops);
292 if (!p) 293 if (!p)
293 goto out_route; 294 goto out_route;
294 p->proc_fops = &atalk_seq_route_fops;
295 295
296 p = create_proc_entry("socket", S_IRUGO, atalk_proc_dir); 296 p = proc_create("socket", S_IRUGO, atalk_proc_dir,
297 &atalk_seq_socket_fops);
297 if (!p) 298 if (!p)
298 goto out_socket; 299 goto out_socket;
299 p->proc_fops = &atalk_seq_socket_fops;
300 300
301 p = create_proc_entry("arp", S_IRUGO, atalk_proc_dir); 301 p = proc_create("arp", S_IRUGO, atalk_proc_dir, &atalk_seq_arp_fops);
302 if (!p) 302 if (!p)
303 goto out_arp; 303 goto out_arp;
304 p->proc_fops = &atalk_seq_arp_fops;
305 304
306 rc = 0; 305 rc = 0;
307out: 306out: