From 46606fcfa7803b36ee67f875e1d783455a326694 Mon Sep 17 00:00:00 2001 From: Pavel Emelyanov Date: Mon, 24 Mar 2008 14:56:34 -0700 Subject: [PATCH] --- yaml --- r: 90261 b: refs/heads/master c: ff2bac6a63e3694e7a97152b7e934fe244e2a858 h: refs/heads/master i: 90259: 55857415c75053f933c849a92e9348cf13808e23 v: v3 --- [refs] | 2 +- trunk/net/ipv4/udplite.c | 14 +++++++++++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index c97385eed1e3..bc9dace1ea58 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 757764f61d07ab8ff84699b6d608eac7bc94cecc +refs/heads/master: ff2bac6a63e3694e7a97152b7e934fe244e2a858 diff --git a/trunk/net/ipv4/udplite.c b/trunk/net/ipv4/udplite.c index 8d42e344b043..653a6fc19023 100644 --- a/trunk/net/ipv4/udplite.c +++ b/trunk/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: