[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>
This commit is contained in:
Andi Kleen 2005-12-22 12:43:42 -08:00 committed by David S. Miller
parent 7708610b1b
commit 77d76ea310
4 changed files with 5 additions and 11 deletions

View file

@ -2036,7 +2036,7 @@ int sock_unregister(int family)
return 0;
}
void __init sock_init(void)
static int __init sock_init(void)
{
/*
* Initialize sock SLAB cache.
@ -2044,12 +2044,10 @@ void __init sock_init(void)
sk_init();
#ifdef SLAB_SKB
/*
* Initialize skbuff SLAB cache
*/
skb_init();
#endif
/*
* Initialize the protocols module.
@ -2058,8 +2056,8 @@ void __init sock_init(void)
init_inodecache();
register_filesystem(&sock_fs_type);
sock_mnt = kern_mount(&sock_fs_type);
/* The real protocol initialization is performed when
* do_initcalls is run.
/* The real protocol initialization is performed in later initcalls.
*/
#ifdef CONFIG_NETFILTER
@ -2067,6 +2065,8 @@ void __init sock_init(void)
#endif
}
core_initcall(sock_init); /* early initcall */
#ifdef CONFIG_PROC_FS
void socket_seq_show(struct seq_file *seq)
{