Commit f913f1d9 authored by Linus Torvalds's avatar Linus Torvalds Committed by David S. Miller

[NETLINK]: Use module_init() in netlink_dev.c

parent 69f65fc6
......@@ -108,7 +108,6 @@ struct netlink_skb_parms
extern int netlink_attach(int unit, int (*function)(int,struct sk_buff *skb));
extern void netlink_detach(int unit);
extern int netlink_post(int unit, struct sk_buff *skb);
extern int init_netlink(void);
extern struct sock *netlink_kernel_create(int unit, void (*input)(struct sock *sk, int len));
extern void netlink_ack(struct sk_buff *in_skb, struct nlmsghdr *nlh, int err);
extern int netlink_unicast(struct sock *ssk, struct sk_buff *skb, __u32 pid, int nonblock);
......
......@@ -1070,9 +1070,6 @@ static int __init netlink_proto_init(void)
#endif
/* The netlink device handler may be needed early. */
rtnetlink_init();
#ifdef CONFIG_NETLINK_DEV
init_netlink();
#endif
return 0;
}
......
......@@ -220,7 +220,7 @@ static struct {
},
};
int __init init_netlink(void)
static int __init init_netlink(void)
{
int i;
......@@ -245,17 +245,7 @@ int __init init_netlink(void)
return 0;
}
#ifdef MODULE
MODULE_LICENSE("GPL");
int init_module(void)
{
printk(KERN_INFO "Network Kernel/User communications module 0.04\n");
return init_netlink();
}
void cleanup_module(void)
static void __exit cleanup_netlink(void)
{
int i;
......@@ -267,4 +257,6 @@ void cleanup_module(void)
unregister_chrdev(NETLINK_MAJOR, "netlink");
}
#endif
MODULE_LICENSE("GPL");
module_init(init_netlink);
module_exit(cleanup_netlink);
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment