diff options
author | Florian Westphal <fw@strlen.de> | 2017-12-02 21:44:07 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-12-04 11:32:39 -0500 |
commit | c1c502b511503ee5de55382744859b622411f32b (patch) | |
tree | b31562756414fd0d71b934e232e91a62bfb59e33 /net/decnet/dn_dev.c | |
parent | e4202511480da5f8e6870d8f6ecbb821aeaa8caf (diff) | |
download | linux-stable-c1c502b511503ee5de55382744859b622411f32b.tar.gz linux-stable-c1c502b511503ee5de55382744859b622411f32b.tar.bz2 linux-stable-c1c502b511503ee5de55382744859b622411f32b.zip |
net: use rtnl_register_module where needed
all of these can be compiled as a module, so use new
_module version to make sure module can no longer be removed
while callback/dump is in use.
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/decnet/dn_dev.c')
-rw-r--r-- | net/decnet/dn_dev.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/net/decnet/dn_dev.c b/net/decnet/dn_dev.c index 9153247dad28..d1885cf59319 100644 --- a/net/decnet/dn_dev.c +++ b/net/decnet/dn_dev.c @@ -1418,9 +1418,12 @@ void __init dn_dev_init(void) dn_dev_devices_on(); - rtnl_register(PF_DECnet, RTM_NEWADDR, dn_nl_newaddr, NULL, 0); - rtnl_register(PF_DECnet, RTM_DELADDR, dn_nl_deladdr, NULL, 0); - rtnl_register(PF_DECnet, RTM_GETADDR, NULL, dn_nl_dump_ifaddr, 0); + rtnl_register_module(THIS_MODULE, PF_DECnet, RTM_NEWADDR, + dn_nl_newaddr, NULL, 0); + rtnl_register_module(THIS_MODULE, PF_DECnet, RTM_DELADDR, + dn_nl_deladdr, NULL, 0); + rtnl_register_module(THIS_MODULE, PF_DECnet, RTM_GETADDR, + NULL, dn_nl_dump_ifaddr, 0); proc_create("decnet_dev", S_IRUGO, init_net.proc_net, &dn_dev_seq_fops); |