diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2012-09-08 02:53:54 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-09-08 18:46:30 -0400 |
commit | 9f00d9776bc5beb92e8bfc884a7e96ddc5589e2e (patch) | |
tree | 2a9f9513a13c73cb1196ebe3426389c1140e2888 /net/core | |
parent | 9785e10aedfa0fad5c1aac709dce5ada1b123783 (diff) | |
download | talos-obmc-linux-9f00d9776bc5beb92e8bfc884a7e96ddc5589e2e.tar.gz talos-obmc-linux-9f00d9776bc5beb92e8bfc884a7e96ddc5589e2e.zip |
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/core')
-rw-r--r-- | net/core/rtnetlink.c | 2 | ||||
-rw-r--r-- | net/core/sock_diag.c | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index a71806eb9cc6..508c5df4a09c 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c @@ -2384,7 +2384,7 @@ static int __net_init rtnetlink_net_init(struct net *net) .flags = NL_CFG_F_NONROOT_RECV, }; - sk = netlink_kernel_create(net, NETLINK_ROUTE, THIS_MODULE, &cfg); + sk = netlink_kernel_create(net, NETLINK_ROUTE, &cfg); if (!sk) return -ENOMEM; net->rtnl = sk; diff --git a/net/core/sock_diag.c b/net/core/sock_diag.c index 9d8755e4a7a5..602cd637182e 100644 --- a/net/core/sock_diag.c +++ b/net/core/sock_diag.c @@ -172,8 +172,7 @@ static int __net_init diag_net_init(struct net *net) .input = sock_diag_rcv, }; - net->diag_nlsk = netlink_kernel_create(net, NETLINK_SOCK_DIAG, - THIS_MODULE, &cfg); + net->diag_nlsk = netlink_kernel_create(net, NETLINK_SOCK_DIAG, &cfg); return net->diag_nlsk == NULL ? -ENOMEM : 0; } |