diff options
Diffstat (limited to 'net/wanrouter/wanproc.c')
-rw-r--r-- | net/wanrouter/wanproc.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/net/wanrouter/wanproc.c b/net/wanrouter/wanproc.c index f2e54c3f064e..5bebe40bf4e6 100644 --- a/net/wanrouter/wanproc.c +++ b/net/wanrouter/wanproc.c | |||
@@ -292,14 +292,12 @@ int __init wanrouter_proc_init(void) | |||
292 | if (!proc_router) | 292 | if (!proc_router) |
293 | goto fail; | 293 | goto fail; |
294 | 294 | ||
295 | p = create_proc_entry("config", S_IRUGO, proc_router); | 295 | p = proc_create("config", S_IRUGO, proc_router, &config_fops); |
296 | if (!p) | 296 | if (!p) |
297 | goto fail_config; | 297 | goto fail_config; |
298 | p->proc_fops = &config_fops; | 298 | p = proc_create("status", S_IRUGO, proc_router, &status_fops); |
299 | p = create_proc_entry("status", S_IRUGO, proc_router); | ||
300 | if (!p) | 299 | if (!p) |
301 | goto fail_stat; | 300 | goto fail_stat; |
302 | p->proc_fops = &status_fops; | ||
303 | return 0; | 301 | return 0; |
304 | fail_stat: | 302 | fail_stat: |
305 | remove_proc_entry("config", proc_router); | 303 | remove_proc_entry("config", proc_router); |
@@ -329,10 +327,10 @@ int wanrouter_proc_add(struct wan_device* wandev) | |||
329 | if (wandev->magic != ROUTER_MAGIC) | 327 | if (wandev->magic != ROUTER_MAGIC) |
330 | return -EINVAL; | 328 | return -EINVAL; |
331 | 329 | ||
332 | wandev->dent = create_proc_entry(wandev->name, S_IRUGO, proc_router); | 330 | wandev->dent = proc_create(wandev->name, S_IRUGO, |
331 | proc_router, &wandev_fops); | ||
333 | if (!wandev->dent) | 332 | if (!wandev->dent) |
334 | return -ENOMEM; | 333 | return -ENOMEM; |
335 | wandev->dent->proc_fops = &wandev_fops; | ||
336 | wandev->dent->data = wandev; | 334 | wandev->dent->data = wandev; |
337 | return 0; | 335 | return 0; |
338 | } | 336 | } |