diff options
author | Cong Wang <xiyou.wangcong@gmail.com> | 2013-02-19 02:47:05 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-02-19 13:18:13 -0500 |
commit | cd0615746ba0f6643fb984345ae6ee0b73404ca6 (patch) | |
tree | f55557971fec403884c37cf28326c28c7670b4cd /net/core/net-procfs.c | |
parent | 082c7ca42b0bf33aa3fb5eeb619dfbcfaa20d216 (diff) | |
download | op-kernel-dev-cd0615746ba0f6643fb984345ae6ee0b73404ca6.zip op-kernel-dev-cd0615746ba0f6643fb984345ae6ee0b73404ca6.tar.gz |
net: fix a build failure when !CONFIG_PROC_FS
When !CONFIG_PROC_FS dev_mcast_init() is not defined,
actually we can just merge dev_mcast_init() into
dev_proc_init().
Reported-by: Gao feng <gaofeng@cn.fujitsu.com>
Cc: Gao feng <gaofeng@cn.fujitsu.com>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/net-procfs.c')
-rw-r--r-- | net/core/net-procfs.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/net/core/net-procfs.c b/net/core/net-procfs.c index ac87066..0f6bb6f 100644 --- a/net/core/net-procfs.c +++ b/net/core/net-procfs.c @@ -341,11 +341,6 @@ static struct pernet_operations __net_initdata dev_proc_ops = { .exit = dev_proc_net_exit, }; -int __init dev_proc_init(void) -{ - return register_pernet_subsys(&dev_proc_ops); -} - static int dev_mc_seq_show(struct seq_file *seq, void *v) { struct netdev_hw_addr *ha; @@ -408,7 +403,10 @@ static struct pernet_operations __net_initdata dev_mc_net_ops = { .exit = dev_mc_net_exit, }; -void __init dev_mcast_init(void) +int __init dev_proc_init(void) { - register_pernet_subsys(&dev_mc_net_ops); + int ret = register_pernet_subsys(&dev_proc_ops); + if (!ret) + return register_pernet_subsys(&dev_mc_net_ops); + return ret; } |