diff options
author | Wang Chen <wangchen@cn.fujitsu.com> | 2008-02-28 13:55:45 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-02-28 13:55:45 -0800 |
commit | 16e297b35811c53288b35e15a5823fd8534c6d21 (patch) | |
tree | 638b371738c214f933d121da13708f52e9d6f399 /net/atm/proc.c | |
parent | ed2b5b474e853fe2f9a9988f2871051291779d90 (diff) | |
download | linux-16e297b35811c53288b35e15a5823fd8534c6d21.tar.gz linux-16e297b35811c53288b35e15a5823fd8534c6d21.tar.bz2 linux-16e297b35811c53288b35e15a5823fd8534c6d21.zip |
[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) goto err_out; sprintf(dev->proc_name,"%s:%d",dev->type, dev->number); - dev->proc_entry = create_proc_entry(dev->proc_name, 0, atm_proc_root); + dev->proc_entry = proc_create(dev->proc_name, 0, atm_proc_root, + &proc_atm_dev_ops); if (!dev->proc_entry) goto err_free_name; dev->proc_entry->data = dev; - dev->proc_entry->proc_fops = &proc_atm_dev_ops; dev->proc_entry->owner = THIS_MODULE; return 0; err_free_name: @@ -492,10 +492,10 @@ int __init atm_proc_init(void) for (e = atm_proc_ents; e->name; e++) { struct proc_dir_entry *dirent; - dirent = create_proc_entry(e->name, S_IRUGO, atm_proc_root); + dirent = proc_create(e->name, S_IRUGO, + atm_proc_root, e->proc_fops); if (!dirent) goto err_out_remove; - dirent->proc_fops = e->proc_fops; dirent->owner = THIS_MODULE; e->dirent = dirent; } |