From 8624512aa908741ba2795200133eae0d7f4557ea Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Thu, 2 Mar 2000 02:36:47 +0000 Subject: Merge with 2.3.48. --- net/wanrouter/wanproc.c | 46 ++++++++-------------------------------------- 1 file changed, 8 insertions(+), 38 deletions(-) (limited to 'net/wanrouter/wanproc.c') diff --git a/net/wanrouter/wanproc.c b/net/wanrouter/wanproc.c index cb8419990..39d7781d0 100644 --- a/net/wanrouter/wanproc.c +++ b/net/wanrouter/wanproc.c @@ -95,25 +95,11 @@ static struct file_operations router_fops = static struct inode_operations router_inode = { - &router_fops, - NULL, /* create */ - NULL, /* lookup */ - NULL, /* link */ - NULL, /* unlink */ - NULL, /* symlink */ - NULL, /* mkdir */ - NULL, /* rmdir */ - NULL, /* mknod */ - NULL, /* rename */ - NULL, /* readlink */ - NULL, /* follow_link */ - NULL, /* truncate */ - router_proc_perms, /* permission */ - NULL /* revalidate */ + permission: router_proc_perms, }; /* - * /proc/net/router/ file and inode operations + * /proc/net/router/ file operations */ static struct file_operations wandev_fops = @@ -122,25 +108,6 @@ static struct file_operations wandev_fops = ioctl: wanrouter_ioctl, }; -static struct inode_operations wandev_inode = -{ - &wandev_fops, - NULL, /* create */ - NULL, /* lookup */ - NULL, /* link */ - NULL, /* unlink */ - NULL, /* symlink */ - NULL, /* mkdir */ - NULL, /* rmdir */ - NULL, /* mknod */ - NULL, /* rename */ - NULL, /* readlink */ - NULL, /* follow_link */ - NULL, /* truncate */ - router_proc_perms, /* permission */ - NULL /* revalidate */ -}; - /* * /proc/net/router */ @@ -175,12 +142,14 @@ int __init wanrouter_proc_init (void) p = create_proc_entry("config",0,proc_router); if (!p) goto fail_config; - p->ops = &router_inode; + p->proc_fops = &router_fops; + p->proc_iops = &router_inode; p->get_info = config_get_info; p = create_proc_entry("status",0,proc_router); if (!p) goto fail_stat; - p->ops = &router_inode; + p->proc_fops = &router_fops; + p->proc_iops = &router_inode; p->get_info = status_get_info; return 0; fail_stat: @@ -214,7 +183,8 @@ int wanrouter_proc_add (wan_device_t* wandev) wandev->dent = create_proc_entry(wandev->name, 0, proc_router); if (!wandev->dent) return -ENOMEM; - wandev->dent->ops = &wandev_inode; + wandev->dent->proc_fops = &wandev_fops; + wandev->dent->proc_iops = &router_inode; wandev->dent->get_info = wandev_get_info; wandev->dent->data = wandev; return 0; -- cgit v1.2.3