diff options
Diffstat (limited to 'net/netrom/af_netrom.c')
| -rw-r--r-- | net/netrom/af_netrom.c | 20 | 
1 files changed, 4 insertions, 16 deletions
diff --git a/net/netrom/af_netrom.c b/net/netrom/af_netrom.c index 4221d98a314b..03f37c4e64fe 100644 --- a/net/netrom/af_netrom.c +++ b/net/netrom/af_netrom.c @@ -1338,18 +1338,6 @@ static const struct seq_operations nr_info_seqops = {  	.stop = nr_info_stop,  	.show = nr_info_show,  }; - -static int nr_info_open(struct inode *inode, struct file *file) -{ -	return seq_open(file, &nr_info_seqops); -} - -static const struct file_operations nr_info_fops = { -	.open = nr_info_open, -	.read = seq_read, -	.llseek = seq_lseek, -	.release = seq_release, -};  #endif	/* CONFIG_PROC_FS */  static const struct net_proto_family nr_family_ops = { @@ -1407,7 +1395,7 @@ static int __init nr_proto_init(void)  		return -1;  	} -	dev_nr = kzalloc(nr_ndevs * sizeof(struct net_device *), GFP_KERNEL); +	dev_nr = kcalloc(nr_ndevs, sizeof(struct net_device *), GFP_KERNEL);  	if (dev_nr == NULL) {  		printk(KERN_ERR "NET/ROM: nr_proto_init - unable to allocate device array\n");  		return -1; @@ -1450,9 +1438,9 @@ static int __init nr_proto_init(void)  	nr_loopback_init(); -	proc_create("nr", 0444, init_net.proc_net, &nr_info_fops); -	proc_create("nr_neigh", 0444, init_net.proc_net, &nr_neigh_fops); -	proc_create("nr_nodes", 0444, init_net.proc_net, &nr_nodes_fops); +	proc_create_seq("nr", 0444, init_net.proc_net, &nr_info_seqops); +	proc_create_seq("nr_neigh", 0444, init_net.proc_net, &nr_neigh_seqops); +	proc_create_seq("nr_nodes", 0444, init_net.proc_net, &nr_node_seqops);  out:  	return rc;  fail:  |