summaryrefslogtreecommitdiffstats
path: root/net/ipv4/udp.c
diff options
context:
space:
mode:
authorDenis V. Lunev <den@openvz.org>2008-03-28 18:25:32 -0700
committerDavid S. Miller <davem@davemloft.net>2008-03-28 18:25:32 -0700
commit3ba9441bdf07370670a684e6d95dfc523476677f (patch)
treeec31a5f5c5e1fc0d807575c733a04d2adbf44c09 /net/ipv4/udp.c
parenta2be75c182cd16bc104919e33451ffda8b6f65b4 (diff)
downloadop-kernel-dev-3ba9441bdf07370670a684e6d95dfc523476677f.zip
op-kernel-dev-3ba9441bdf07370670a684e6d95dfc523476677f.tar.gz
[UDP]: Place file operations directly into udp_seq_afinfo.
No need to have separate never-used variable. Signed-off-by: Denis V. Lunev <den@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/udp.c')
-rw-r--r--net/ipv4/udp.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/net/ipv4/udp.c b/net/ipv4/udp.c
index e716d2d..a95dff8 100644
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -1596,17 +1596,17 @@ int udp_proc_register(struct net *net, struct udp_seq_afinfo *afinfo)
struct proc_dir_entry *p;
int rc = 0;
- afinfo->seq_fops->owner = afinfo->owner;
- afinfo->seq_fops->open = udp_seq_open;
- afinfo->seq_fops->read = seq_read;
- afinfo->seq_fops->llseek = seq_lseek;
- afinfo->seq_fops->release = seq_release_net;
+ afinfo->seq_fops.owner = afinfo->owner;
+ afinfo->seq_fops.open = udp_seq_open;
+ afinfo->seq_fops.read = seq_read;
+ afinfo->seq_fops.llseek = seq_lseek;
+ afinfo->seq_fops.release = seq_release_net;
afinfo->seq_ops.start = udp_seq_start;
afinfo->seq_ops.next = udp_seq_next;
afinfo->seq_ops.stop = udp_seq_stop;
- p = proc_net_fops_create(net, afinfo->name, S_IRUGO, afinfo->seq_fops);
+ p = proc_net_fops_create(net, afinfo->name, S_IRUGO, &afinfo->seq_fops);
if (p)
p->data = afinfo;
else
@@ -1617,7 +1617,6 @@ int udp_proc_register(struct net *net, struct udp_seq_afinfo *afinfo)
void udp_proc_unregister(struct net *net, struct udp_seq_afinfo *afinfo)
{
proc_net_remove(net, afinfo->name);
- memset(afinfo->seq_fops, 0, sizeof(*afinfo->seq_fops));
}
/* ------------------------------------------------------------------------ */
@@ -1656,13 +1655,11 @@ int udp4_seq_show(struct seq_file *seq, void *v)
}
/* ------------------------------------------------------------------------ */
-static struct file_operations udp4_seq_fops;
static struct udp_seq_afinfo udp4_seq_afinfo = {
.owner = THIS_MODULE,
.name = "udp",
.family = AF_INET,
.hashtable = udp_hash,
- .seq_fops = &udp4_seq_fops,
.seq_ops = {
.show = udp4_seq_show,
},
OpenPOWER on IntegriCloud