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>
This commit is contained in:
committed by
David S. Miller
parent
9785e10aed
commit
9f00d9776b
@ -153,6 +153,7 @@ struct nlattr {
|
||||
|
||||
#include <linux/capability.h>
|
||||
#include <linux/skbuff.h>
|
||||
#include <linux/module.h>
|
||||
#include <net/scm.h>
|
||||
|
||||
struct net;
|
||||
@ -188,9 +189,15 @@ struct netlink_kernel_cfg {
|
||||
unsigned int flags;
|
||||
};
|
||||
|
||||
extern struct sock *netlink_kernel_create(struct net *net, int unit,
|
||||
struct module *module,
|
||||
struct netlink_kernel_cfg *cfg);
|
||||
extern struct sock *__netlink_kernel_create(struct net *net, int unit,
|
||||
struct module *module,
|
||||
struct netlink_kernel_cfg *cfg);
|
||||
static inline struct sock *
|
||||
netlink_kernel_create(struct net *net, int unit, struct netlink_kernel_cfg *cfg)
|
||||
{
|
||||
return __netlink_kernel_create(net, unit, THIS_MODULE, cfg);
|
||||
}
|
||||
|
||||
extern void netlink_kernel_release(struct sock *sk);
|
||||
extern int __netlink_change_ngroups(struct sock *sk, unsigned int groups);
|
||||
extern int netlink_change_ngroups(struct sock *sk, unsigned int groups);
|
||||
|
||||
Reference in New Issue
Block a user