aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/ipv4/udplite.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/net/ipv4/udplite.c b/net/ipv4/udplite.c
index 8d42e344b043..653a6fc19023 100644
--- a/net/ipv4/udplite.c
+++ b/net/ipv4/udplite.c
@@ -82,6 +82,16 @@ static struct udp_seq_afinfo udplite4_seq_afinfo = {
82 .seq_show = udp4_seq_show, 82 .seq_show = udp4_seq_show,
83 .seq_fops = &udplite4_seq_fops, 83 .seq_fops = &udplite4_seq_fops,
84}; 84};
85
86static __init int udplite4_proc_init(void)
87{
88 return udp_proc_register(&init_net, &udplite4_seq_afinfo);
89}
90#else
91static inline int udplite4_proc_init(void)
92{
93 return 0;
94}
85#endif 95#endif
86 96
87void __init udplite4_register(void) 97void __init udplite4_register(void)
@@ -94,10 +104,8 @@ void __init udplite4_register(void)
94 104
95 inet_register_protosw(&udplite4_protosw); 105 inet_register_protosw(&udplite4_protosw);
96 106
97#ifdef CONFIG_PROC_FS 107 if (udplite4_proc_init())
98 if (udp_proc_register(&init_net, &udplite4_seq_afinfo))
99 printk(KERN_ERR "%s: Cannot register /proc!\n", __func__); 108 printk(KERN_ERR "%s: Cannot register /proc!\n", __func__);
100#endif
101 return; 109 return;
102 110
103out_unregister_proto: 111out_unregister_proto: