aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGao feng <gaofeng@cn.fujitsu.com>2013-02-17 20:34:54 -0500
committerDavid S. Miller <davem@davemloft.net>2013-02-18 14:53:08 -0500
commitd4beaa66add8aebf83ab16d2fde4e4de8dac36df (patch)
tree87e69803c16904077d04c212d7b58acbfa62d143
parent510a1e7249298f6bbd049e1ec98041ddf5ef6452 (diff)
net: proc: change proc_net_fops_create to proc_create
Right now, some modules such as bonding use proc_create to create proc entries under /proc/net/, and other modules such as ipv4 use proc_net_fops_create. It looks a little chaos.this patch changes all of proc_net_fops_create to proc_create. we can remove proc_net_fops_create after this patch. Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/connector/connector.c2
-rw-r--r--drivers/net/hamradio/bpqether.c3
-rw-r--r--drivers/net/hamradio/scc.c2
-rw-r--r--drivers/net/hamradio/yam.c2
-rw-r--r--drivers/net/ppp/pppoe.c2
-rw-r--r--net/ax25/af_ax25.c7
-rw-r--r--net/bluetooth/af_bluetooth.c2
-rw-r--r--net/core/dev.c7
-rw-r--r--net/core/dev_addr_lists.c2
-rw-r--r--net/core/sock.c2
-rw-r--r--net/dccp/probe.c2
-rw-r--r--net/decnet/af_decnet.c2
-rw-r--r--net/decnet/dn_dev.c2
-rw-r--r--net/decnet/dn_neigh.c3
-rw-r--r--net/decnet/dn_route.c3
-rw-r--r--net/ipv4/arp.c2
-rw-r--r--net/ipv4/fib_trie.c8
-rw-r--r--net/ipv4/igmp.c5
-rw-r--r--net/ipv4/ipconfig.c2
-rw-r--r--net/ipv4/ipmr.c4
-rw-r--r--net/ipv4/netfilter/nf_conntrack_l3proto_ipv4_compat.c6
-rw-r--r--net/ipv4/ping.c2
-rw-r--r--net/ipv4/proc.c7
-rw-r--r--net/ipv4/raw.c2
-rw-r--r--net/ipv4/route.c4
-rw-r--r--net/ipv4/tcp_probe.c2
-rw-r--r--net/ipv6/addrconf.c2
-rw-r--r--net/ipv6/anycast.c2
-rw-r--r--net/ipv6/ip6_flowlabel.c4
-rw-r--r--net/ipv6/ip6mr.c4
-rw-r--r--net/ipv6/mcast.c6
-rw-r--r--net/ipv6/proc.c6
-rw-r--r--net/ipv6/raw.c2
-rw-r--r--net/ipv6/route.c4
-rw-r--r--net/key/af_key.c2
-rw-r--r--net/l2tp/l2tp_ppp.c3
-rw-r--r--net/netfilter/ipvs/ip_vs_app.c2
-rw-r--r--net/netfilter/ipvs/ip_vs_conn.c4
-rw-r--r--net/netfilter/ipvs/ip_vs_ctl.c8
-rw-r--r--net/netfilter/nf_conntrack_expect.c3
-rw-r--r--net/netfilter/nf_conntrack_standalone.c2
-rw-r--r--net/netlink/af_netlink.c2
-rw-r--r--net/netrom/af_netrom.c6
-rw-r--r--net/packet/af_packet.c2
-rw-r--r--net/phonet/pn_dev.c4
-rw-r--r--net/rose/af_rose.c11
-rw-r--r--net/rxrpc/af_rxrpc.c5
-rw-r--r--net/sched/sch_api.c2
-rw-r--r--net/sctp/probe.c4
-rw-r--r--net/unix/af_unix.c2
-rw-r--r--net/wireless/wext-proc.c3
-rw-r--r--net/xfrm/xfrm_proc.c4
52 files changed, 100 insertions, 86 deletions
diff --git a/drivers/connector/connector.c b/drivers/connector/connector.c
index 7b695913cb30..ed17a57ab3cb 100644
--- a/drivers/connector/connector.c
+++ b/drivers/connector/connector.c
@@ -276,7 +276,7 @@ static int cn_init(void)
276 276
277 cn_already_initialized = 1; 277 cn_already_initialized = 1;
278 278
279 proc_net_fops_create(&init_net, "connector", S_IRUGO, &cn_file_ops); 279 proc_create("connector", S_IRUGO, init_net.proc_net, &cn_file_ops);
280 280
281 return 0; 281 return 0;
282} 282}
diff --git a/drivers/net/hamradio/bpqether.c b/drivers/net/hamradio/bpqether.c
index c2e5497397d5..61f28842163d 100644
--- a/drivers/net/hamradio/bpqether.c
+++ b/drivers/net/hamradio/bpqether.c
@@ -586,7 +586,8 @@ static int bpq_device_event(struct notifier_block *this,unsigned long event, voi
586static int __init bpq_init_driver(void) 586static int __init bpq_init_driver(void)
587{ 587{
588#ifdef CONFIG_PROC_FS 588#ifdef CONFIG_PROC_FS
589 if (!proc_net_fops_create(&init_net, "bpqether", S_IRUGO, &bpq_info_fops)) { 589 if (!proc_create("bpqether", S_IRUGO, init_net.proc_net,
590 &bpq_info_fops)) {
590 printk(KERN_ERR 591 printk(KERN_ERR
591 "bpq: cannot create /proc/net/bpqether entry.\n"); 592 "bpq: cannot create /proc/net/bpqether entry.\n");
592 return -ENOENT; 593 return -ENOENT;
diff --git a/drivers/net/hamradio/scc.c b/drivers/net/hamradio/scc.c
index 1b4a47bd32b7..cab13f4d2942 100644
--- a/drivers/net/hamradio/scc.c
+++ b/drivers/net/hamradio/scc.c
@@ -2118,7 +2118,7 @@ static int __init scc_init_driver (void)
2118 } 2118 }
2119 rtnl_unlock(); 2119 rtnl_unlock();
2120 2120
2121 proc_net_fops_create(&init_net, "z8530drv", 0, &scc_net_seq_fops); 2121 proc_create("z8530drv", 0, init_net.proc_net, &scc_net_seq_fops);
2122 2122
2123 return 0; 2123 return 0;
2124} 2124}
diff --git a/drivers/net/hamradio/yam.c b/drivers/net/hamradio/yam.c
index c6645f1017af..92847d27b2e8 100644
--- a/drivers/net/hamradio/yam.c
+++ b/drivers/net/hamradio/yam.c
@@ -1167,7 +1167,7 @@ static int __init yam_init_driver(void)
1167 yam_timer.expires = jiffies + HZ / 100; 1167 yam_timer.expires = jiffies + HZ / 100;
1168 add_timer(&yam_timer); 1168 add_timer(&yam_timer);
1169 1169
1170 proc_net_fops_create(&init_net, "yam", S_IRUGO, &yam_info_fops); 1170 proc_create("yam", S_IRUGO, init_net.proc_net, &yam_info_fops);
1171 return 0; 1171 return 0;
1172 error: 1172 error:
1173 while (--i >= 0) { 1173 while (--i >= 0) {
diff --git a/drivers/net/ppp/pppoe.c b/drivers/net/ppp/pppoe.c
index 20f31d0d1536..d7fa96c42ae7 100644
--- a/drivers/net/ppp/pppoe.c
+++ b/drivers/net/ppp/pppoe.c
@@ -1134,7 +1134,7 @@ static __net_init int pppoe_init_net(struct net *net)
1134 1134
1135 rwlock_init(&pn->hash_lock); 1135 rwlock_init(&pn->hash_lock);
1136 1136
1137 pde = proc_net_fops_create(net, "pppoe", S_IRUGO, &pppoe_seq_fops); 1137 pde = proc_create("pppoe", S_IRUGO, net->proc_net, &pppoe_seq_fops);
1138#ifdef CONFIG_PROC_FS 1138#ifdef CONFIG_PROC_FS
1139 if (!pde) 1139 if (!pde)
1140 return -ENOMEM; 1140 return -ENOMEM;
diff --git a/net/ax25/af_ax25.c b/net/ax25/af_ax25.c
index 779095ded689..b6ccbea3477e 100644
--- a/net/ax25/af_ax25.c
+++ b/net/ax25/af_ax25.c
@@ -1992,9 +1992,10 @@ static int __init ax25_init(void)
1992 dev_add_pack(&ax25_packet_type); 1992 dev_add_pack(&ax25_packet_type);
1993 register_netdevice_notifier(&ax25_dev_notifier); 1993 register_netdevice_notifier(&ax25_dev_notifier);
1994 1994
1995 proc_net_fops_create(&init_net, "ax25_route", S_IRUGO, &ax25_route_fops); 1995 proc_create("ax25_route", S_IRUGO, init_net.proc_net,
1996 proc_net_fops_create(&init_net, "ax25", S_IRUGO, &ax25_info_fops); 1996 &ax25_route_fops);
1997 proc_net_fops_create(&init_net, "ax25_calls", S_IRUGO, &ax25_uid_fops); 1997 proc_create("ax25", S_IRUGO, init_net.proc_net, &ax25_info_fops);
1998 proc_create("ax25_calls", S_IRUGO, init_net.proc_net, &ax25_uid_fops);
1998out: 1999out:
1999 return rc; 2000 return rc;
2000} 2001}
diff --git a/net/bluetooth/af_bluetooth.c b/net/bluetooth/af_bluetooth.c
index 5355df63d39b..8412b637407b 100644
--- a/net/bluetooth/af_bluetooth.c
+++ b/net/bluetooth/af_bluetooth.c
@@ -641,7 +641,7 @@ int bt_procfs_init(struct module* module, struct net *net, const char *name,
641 sk_list->fops.llseek = seq_lseek; 641 sk_list->fops.llseek = seq_lseek;
642 sk_list->fops.release = seq_release_private; 642 sk_list->fops.release = seq_release_private;
643 643
644 pde = proc_net_fops_create(net, name, 0, &sk_list->fops); 644 pde = proc_create(name, 0, net->proc_net, &sk_list->fops);
645 if (!pde) 645 if (!pde)
646 return -ENOMEM; 646 return -ENOMEM;
647 647
diff --git a/net/core/dev.c b/net/core/dev.c
index 1932d351ed7c..f2f81ef5bbd6 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -4518,11 +4518,12 @@ static int __net_init dev_proc_net_init(struct net *net)
4518{ 4518{
4519 int rc = -ENOMEM; 4519 int rc = -ENOMEM;
4520 4520
4521 if (!proc_net_fops_create(net, "dev", S_IRUGO, &dev_seq_fops)) 4521 if (!proc_create("dev", S_IRUGO, net->proc_net, &dev_seq_fops))
4522 goto out; 4522 goto out;
4523 if (!proc_net_fops_create(net, "softnet_stat", S_IRUGO, &softnet_seq_fops)) 4523 if (!proc_create("softnet_stat", S_IRUGO, net->proc_net,
4524 &softnet_seq_fops))
4524 goto out_dev; 4525 goto out_dev;
4525 if (!proc_net_fops_create(net, "ptype", S_IRUGO, &ptype_seq_fops)) 4526