summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorPavel Emelyanov <xemul@openvz.org>2008-03-24 14:56:34 -0700
committerDavid S. Miller <davem@davemloft.net>2008-03-24 14:56:34 -0700
commitff2bac6a63e3694e7a97152b7e934fe244e2a858 (patch)
tree8b00a0ccf83b303fe7cfcb91af4fec70c97178e6 /net
parent757764f61d07ab8ff84699b6d608eac7bc94cecc (diff)
downloadblackbird-op-linux-ff2bac6a63e3694e7a97152b7e934fe244e2a858.tar.gz
blackbird-op-linux-ff2bac6a63e3694e7a97152b7e934fe244e2a858.zip
[UDP-Lite]: Clean up proc creation a bit.
Just introduce a helper to remove ifdefs from inside the udplite4_register function. This will help to make the next patch nicer. Signed-off-by: Pavel Emelyanov <xemul@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-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 = {
.seq_show = udp4_seq_show,
.seq_fops = &udplite4_seq_fops,
};
+
+static __init int udplite4_proc_init(void)
+{
+ return udp_proc_register(&init_net, &udplite4_seq_afinfo);
+}
+#else
+static inline int udplite4_proc_init(void)
+{
+ return 0;
+}
#endif
void __init udplite4_register(void)
@@ -94,10 +104,8 @@ void __init udplite4_register(void)
inet_register_protosw(&udplite4_protosw);
-#ifdef CONFIG_PROC_FS
- if (udp_proc_register(&init_net, &udplite4_seq_afinfo))
+ if (udplite4_proc_init())
printk(KERN_ERR "%s: Cannot register /proc!\n", __func__);
-#endif
return;
out_unregister_proto:
OpenPOWER on IntegriCloud