Skip to content

Commit

Permalink
[LLC]: Use proc_create() to setup ->proc_fops first
Browse files Browse the repository at this point in the history
Use proc_create() to make sure that ->proc_fops be setup before gluing
PDE to main tree.

Signed-off-by: Wang Chen <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Wang Chen authored and davem330 committed Feb 28, 2008
1 parent 1e15dc9 commit 7e02180
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions net/llc/llc_proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -239,18 +239,14 @@ int __init llc_proc_init(void)
goto out;
llc_proc_dir->owner = THIS_MODULE;

p = create_proc_entry("socket", S_IRUGO, llc_proc_dir);
p = proc_create("socket", S_IRUGO, llc_proc_dir, &llc_seq_socket_fops);
if (!p)
goto out_socket;

p->proc_fops = &llc_seq_socket_fops;

p = create_proc_entry("core", S_IRUGO, llc_proc_dir);
p = proc_create("core", S_IRUGO, llc_proc_dir, &llc_seq_core_fops);
if (!p)
goto out_core;

p->proc_fops = &llc_seq_core_fops;

rc = 0;
out:
return rc;
Expand Down

0 comments on commit 7e02180

Please sign in to comment.