aboutsummaryrefslogtreecommitdiffstats
path: root/net/socket.c
diff options
context:
space:
mode:
authorAndi Kleen <ak@suse.de>2005-12-22 15:43:42 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2006-01-03 16:11:14 -0500
commit77d76ea310b50a9c8ff15bd290fcb4ed4961adf2 (patch)
tree7d6e8b2426d4b3debe5ddf838ab2a2ef13f1b106 /net/socket.c
parent7708610b1bff4a0ba8a73733d3c7c4bda9f94b21 (diff)
[NET]: Small cleanup to socket initialization
sock_init can be done as a core_initcall instead of calling it directly in init/main.c Also I removed an out of date #ifdef. Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/socket.c')
-rw-r--r--net/socket.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/net/socket.c b/net/socket.c
index 3145103cdf54..98be7ef3c086 100644
--- a/net/socket.c
+++ b/net/socket.c
@@ -2036,7 +2036,7 @@ int sock_unregister(int family)
2036 return 0; 2036 return 0;
2037} 2037}
2038 2038
2039void __init sock_init(void) 2039static int __init sock_init(void)
2040{ 2040{
2041 /* 2041 /*
2042 * Initialize sock SLAB cache. 2042 * Initialize sock SLAB cache.
@@ -2044,12 +2044,10 @@ void __init sock_init(void)
2044 2044
2045 sk_init(); 2045 sk_init();
2046 2046
2047#ifdef SLAB_SKB
2048 /* 2047 /*
2049 * Initialize skbuff SLAB cache 2048 * Initialize skbuff SLAB cache
2050 */ 2049 */
2051 skb_init(); 2050 skb_init();
2052#endif
2053 2051
2054 /* 2052 /*
2055 * Initialize the protocols module. 2053 * Initialize the protocols module.
@@ -2058,8 +2056,8 @@ void __init sock_init(void)
2058 init_inodecache(); 2056 init_inodecache();
2059 register_filesystem(&sock_fs_type); 2057 register_filesystem(&sock_fs_type);
2060 sock_mnt = kern_mount(&sock_fs_type); 2058 sock_mnt = kern_mount(&sock_fs_type);
2061 /* The real protocol initialization is performed when 2059
2062 * do_initcalls is run. 2060 /* The real protocol initialization is performed in later initcalls.
2063 */ 2061 */
2064 2062
2065#ifdef CONFIG_NETFILTER 2063#ifdef CONFIG_NETFILTER
@@ -2067,6 +2065,8 @@ void __init sock_init(void)
2067#endif 2065#endif
2068} 2066}
2069 2067
2068core_initcall(sock_init); /* early initcall */
2069
2070#ifdef CONFIG_PROC_FS 2070#ifdef CONFIG_PROC_FS
2071void socket_seq_show(struct seq_file *seq) 2071void socket_seq_show(struct seq_file *seq)
2072{ 2072{