mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-26 16:41:25 +00:00
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>
This commit is contained in:
parent
082c7ca42b
commit
cd0615746b
3 changed files with 5 additions and 9 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue