aboutsummaryrefslogtreecommitdiffstats
path: root/net/decnet/dn_dev.c
diff options
context:
space:
mode:
authorThomas Graf <tgraf@suug.ch>2007-03-22 14:57:46 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-26 01:27:12 -0400
commitfa34ddd739cecf3999ec0b7562618e8321829d41 (patch)
treeddc3534b56faca48077922cddbbb79e9b5b0c1ea /net/decnet/dn_dev.c
parent708914cc5e1657eb1a1f9eefc6333dfd2df8c73a (diff)
[DECNet]: Use rtnl registration interface
Signed-off-by: Thomas Graf <tgraf@suug.ch> Acked-by: Steven Whitehouse <swhiteho@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/decnet/dn_dev.c')
-rw-r--r--net/decnet/dn_dev.c24
1 files changed, 3 insertions, 21 deletions
diff --git a/net/decnet/dn_dev.c b/net/decnet/dn_dev.c
index 95871a669dc4..61be2caddc57 100644
--- a/net/decnet/dn_dev.c
+++ b/net/decnet/dn_dev.c
@@ -1447,24 +1447,6 @@ static const struct file_operations dn_dev_seq_fops = {
1447 1447
1448#endif /* CONFIG_PROC_FS */ 1448#endif /* CONFIG_PROC_FS */
1449 1449
1450static struct rtnetlink_link dnet_rtnetlink_table[RTM_NR_MSGTYPES] =
1451{
1452 [RTM_NEWADDR - RTM_BASE] = { .doit = dn_nl_newaddr, },
1453 [RTM_DELADDR - RTM_BASE] = { .doit = dn_nl_deladdr, },
1454 [RTM_GETADDR - RTM_BASE] = { .dumpit = dn_nl_dump_ifaddr, },
1455#ifdef CONFIG_DECNET_ROUTER
1456 [RTM_NEWROUTE - RTM_BASE] = { .doit = dn_fib_rtm_newroute, },
1457 [RTM_DELROUTE - RTM_BASE] = { .doit = dn_fib_rtm_delroute, },
1458 [RTM_GETROUTE - RTM_BASE] = { .doit = dn_cache_getroute,
1459 .dumpit = dn_fib_dump, },
1460 [RTM_GETRULE - RTM_BASE] = { .dumpit = dn_fib_dump_rules, },
1461#else
1462 [RTM_GETROUTE - RTM_BASE] = { .doit = dn_cache_getroute,
1463 .dumpit = dn_cache_dump, },
1464#endif
1465
1466};
1467
1468static int __initdata addr[2]; 1450static int __initdata addr[2];
1469module_param_array(addr, int, NULL, 0444); 1451module_param_array(addr, int, NULL, 0444);
1470MODULE_PARM_DESC(addr, "The DECnet address of this machine: area,node"); 1452MODULE_PARM_DESC(addr, "The DECnet address of this machine: area,node");
@@ -1485,7 +1467,9 @@ void __init dn_dev_init(void)
1485 1467
1486 dn_dev_devices_on(); 1468 dn_dev_devices_on();
1487 1469
1488 rtnetlink_links[PF_DECnet] = dnet_rtnetlink_table; 1470 rtnl_register(PF_DECnet, RTM_NEWADDR, dn_nl_newaddr, NULL);
1471 rtnl_register(PF_DECnet, RTM_DELADDR, dn_nl_deladdr, NULL);
1472 rtnl_register(PF_DECnet, RTM_GETADDR, NULL, dn_nl_dump_ifaddr);
1489 1473
1490 proc_net_fops_create("decnet_dev", S_IRUGO, &dn_dev_seq_fops); 1474 proc_net_fops_create("decnet_dev", S_IRUGO, &dn_dev_seq_fops);
1491 1475
@@ -1500,8 +1484,6 @@ void __init dn_dev_init(void)
1500 1484
1501void __exit dn_dev_cleanup(void) 1485void __exit dn_dev_cleanup(void)
1502{ 1486{
1503 rtnetlink_links[PF_DECnet] = NULL;
1504
1505#ifdef CONFIG_SYSCTL 1487#ifdef CONFIG_SYSCTL
1506 { 1488 {
1507 int i; 1489 int i;