aboutsummaryrefslogtreecommitdiffstats
path: root/net/netlink
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2012-09-07 22:53:54 -0400
committerDavid S. Miller <davem@davemloft.net>2012-09-08 18:46:30 -0400
commit9f00d9776bc5beb92e8bfc884a7e96ddc5589e2e (patch)
tree2a9f9513a13c73cb1196ebe3426389c1140e2888 /net/netlink
parent9785e10aedfa0fad5c1aac709dce5ada1b123783 (diff)
netlink: hide struct module parameter in netlink_kernel_create
This patch defines netlink_kernel_create as a wrapper function of __netlink_kernel_create to hide the struct module *me parameter (which seems to be THIS_MODULE in all existing netlink subsystems). Suggested by David S. Miller. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/netlink')
-rw-r--r--net/netlink/af_netlink.c8
-rw-r--r--net/netlink/genetlink.c3
2 files changed, 4 insertions, 7 deletions
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index b74540ce3c14..4d348e97e131 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -1526,9 +1526,8 @@ static void netlink_data_ready(struct sock *sk, int len)
1526 */ 1526 */
1527 1527
1528struct sock * 1528struct sock *
1529netlink_kernel_create(struct net *net, int unit, 1529__netlink_kernel_create(struct net *net, int unit, struct module *module,
1530 struct module *module, 1530 struct netlink_kernel_cfg *cfg)
1531 struct netlink_kernel_cfg *cfg)
1532{ 1531{
1533 struct socket *sock; 1532 struct socket *sock;
1534 struct sock *sk; 1533 struct sock *sk;
@@ -1603,8 +1602,7 @@ out_sock_release_nosk:
1603 sock_release(sock); 1602 sock_release(sock);
1604 return NULL; 1603 return NULL;
1605} 1604}
1606EXPORT_SYMBOL(netlink_kernel_create); 1605EXPORT_SYMBOL(__netlink_kernel_create);
1607
1608 1606
1609void 1607void
1610netlink_kernel_release(struct sock *sk) 1608netlink_kernel_release(struct sock *sk)
diff --git a/net/netlink/genetlink.c b/net/netlink/genetlink.c
index c1b71aef9f71..19288b7d6135 100644
--- a/net/netlink/genetlink.c
+++ b/net/netlink/genetlink.c
@@ -922,8 +922,7 @@ static int __net_init genl_pernet_init(struct net *net)
922 }; 922 };
923 923
924 /* we'll bump the group number right afterwards */ 924 /* we'll bump the group number right afterwards */
925 net->genl_sock = netlink_kernel_create(net, NETLINK_GENERIC, 925 net->genl_sock = netlink_kernel_create(net, NETLINK_GENERIC, &cfg);
926 THIS_MODULE, &cfg);
927 926
928 if (!net->genl_sock && net_eq(net, &init_net)) 927 if (!net->genl_sock && net_eq(net, &init_net))
929 panic("GENL: Cannot initialize generic netlink\n"); 928 panic("GENL: Cannot initialize generic netlink\n");