diff options
author | Wang Chen <wangchen@cn.fujitsu.com> | 2008-02-28 16:55:45 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-02-28 16:55:45 -0500 |
commit | 16e297b35811c53288b35e15a5823fd8534c6d21 (patch) | |
tree | 638b371738c214f933d121da13708f52e9d6f399 /net/atm/proc.c | |
parent | ed2b5b474e853fe2f9a9988f2871051291779d90 (diff) |
[ATM]: 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/atm/proc.c')
-rw-r--r-- | net/atm/proc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/atm/proc.c b/net/atm/proc.c index 49125110bb8b..e9693aed7ef8 100644 --- a/net/atm/proc.c +++ b/net/atm/proc.c | |||
@@ -435,11 +435,11 @@ int atm_proc_dev_register(struct atm_dev *dev) | |||
435 | goto err_out; | 435 | goto err_out; |
436 | sprintf(dev->proc_name,"%s:%d",dev->type, dev->number); | 436 | sprintf(dev->proc_name,"%s:%d",dev->type, dev->number); |
437 | 437 | ||
438 | dev->proc_entry = create_proc_entry(dev->proc_name, 0, atm_proc_root); | 438 | dev->proc_entry = proc_create(dev->proc_name, 0, atm_proc_root, |
439 | &proc_atm_dev_ops); | ||
439 | if (!dev->proc_entry) | 440 | if (!dev->proc_entry) |
440 | goto err_free_name; | 441 | goto err_free_name; |
441 | dev->proc_entry->data = dev; | 442 | dev->proc_entry->data = dev; |
442 | dev->proc_entry->proc_fops = &proc_atm_dev_ops; | ||
443 | dev->proc_entry->owner = THIS_MODULE; | 443 | dev->proc_entry->owner = THIS_MODULE; |
444 | return 0; | 444 | return 0; |
445 | err_free_name: | 445 | err_free_name: |
@@ -492,10 +492,10 @@ int __init atm_proc_init(void) | |||
492 | for (e = atm_proc_ents; e->name; e++) { | 492 | for (e = atm_proc_ents; e->name; e++) { |
493 | struct proc_dir_entry *dirent; | 493 | struct proc_dir_entry *dirent; |
494 | 494 | ||
495 | dirent = create_proc_entry(e->name, S_IRUGO, atm_proc_root); | 495 | dirent = proc_create(e->name, S_IRUGO, |
496 | atm_proc_root, e->proc_fops); | ||
496 | if (!dirent) | 497 | if (!dirent) |
497 | goto err_out_remove; | 498 | goto err_out_remove; |
498 | dirent->proc_fops = e->proc_fops; | ||
499 | dirent->owner = THIS_MODULE; | 499 | dirent->owner = THIS_MODULE; |
500 | e->dirent = dirent; | 500 | e->dirent = dirent; |
501 | } | 501 | } |