aboutsummaryrefslogtreecommitdiffstats
path: root/net/decnet/dn_dev.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/decnet/dn_dev.c')
-rw-r--r--net/decnet/dn_dev.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/net/decnet/dn_dev.c b/net/decnet/dn_dev.c
index 83cb0761336a..ddfd2aff44d8 100644
--- a/net/decnet/dn_dev.c
+++ b/net/decnet/dn_dev.c
@@ -513,7 +513,7 @@ int dn_dev_ioctl(unsigned int cmd, void __user *arg)
513 ifr->ifr_name[IFNAMSIZ-1] = 0; 513 ifr->ifr_name[IFNAMSIZ-1] = 0;
514 514
515#ifdef CONFIG_KMOD 515#ifdef CONFIG_KMOD
516 dev_load(ifr->ifr_name); 516 dev_load(&init_net, ifr->ifr_name);
517#endif 517#endif
518 518
519 switch(cmd) { 519 switch(cmd) {
@@ -531,7 +531,7 @@ int dn_dev_ioctl(unsigned int cmd, void __user *arg)
531 531
532 rtnl_lock(); 532 rtnl_lock();
533 533
534 if ((dev = __dev_get_by_name(ifr->ifr_name)) == NULL) { 534 if ((dev = __dev_get_by_name(&init_net, ifr->ifr_name)) == NULL) {
535 ret = -ENODEV; 535 ret = -ENODEV;
536 goto done; 536 goto done;
537 } 537 }
@@ -629,7 +629,7 @@ static struct dn_dev *dn_dev_by_index(int ifindex)
629{ 629{
630 struct net_device *dev; 630 struct net_device *dev;
631 struct dn_dev *dn_dev = NULL; 631 struct dn_dev *dn_dev = NULL;
632 dev = dev_get_by_index(ifindex); 632 dev = dev_get_by_index(&init_net, ifindex);
633 if (dev) { 633 if (dev) {
634 dn_dev = dev->dn_ptr; 634 dn_dev = dev->dn_ptr;
635 dev_put(dev); 635 dev_put(dev);
@@ -694,7 +694,7 @@ static int dn_nl_newaddr(struct sk_buff *skb, struct nlmsghdr *nlh, void *arg)
694 return -EINVAL; 694 return -EINVAL;
695 695
696 ifm = nlmsg_data(nlh); 696 ifm = nlmsg_data(nlh);
697 if ((dev = __dev_get_by_index(ifm->ifa_index)) == NULL) 697 if ((dev = __dev_get_by_index(&init_net, ifm->ifa_index)) == NULL)
698 return -ENODEV; 698 return -ENODEV;
699 699
700 if ((dn_db = dev->dn_ptr) == NULL) { 700 if ((dn_db = dev->dn_ptr) == NULL) {
@@ -800,7 +800,7 @@ static int dn_nl_dump_ifaddr(struct sk_buff *skb, struct netlink_callback *cb)
800 skip_naddr = cb->args[1]; 800 skip_naddr = cb->args[1];
801 801
802 idx = 0; 802 idx = 0;
803 for_each_netdev(dev) { 803 for_each_netdev(&init_net, dev) {
804 if (idx < skip_ndevs) 804 if (idx < skip_ndevs)
805 goto cont; 805 goto cont;
806 else if (idx > skip_ndevs) { 806 else if (idx > skip_ndevs) {
@@ -1297,7 +1297,7 @@ void dn_dev_devices_off(void)
1297 struct net_device *dev; 1297 struct net_device *dev;
1298 1298
1299 rtnl_lock(); 1299 rtnl_lock();
1300 for_each_netdev(dev) 1300 for_each_netdev(&init_net, dev)
1301 dn_dev_down(dev); 1301 dn_dev_down(dev);
1302 rtnl_unlock(); 1302 rtnl_unlock();
1303 1303
@@ -1308,7 +1308,7 @@ void dn_dev_devices_on(void)
1308 struct net_device *dev; 1308 struct net_device *dev;
1309 1309
1310 rtnl_lock(); 1310 rtnl_lock();
1311 for_each_netdev(dev) { 1311 for_each_netdev(&init_net, dev) {
1312 if (dev->flags & IFF_UP) 1312 if (dev->flags & IFF_UP)
1313 dn_dev_up(dev); 1313 dn_dev_up(dev);
1314 } 1314 }
@@ -1342,7 +1342,7 @@ static void *dn_dev_seq_start(struct seq_file *seq, loff_t *pos)
1342 return SEQ_START_TOKEN; 1342 return SEQ_START_TOKEN;
1343 1343
1344 i = 1; 1344 i = 1;
1345 for_each_netdev(dev) { 1345 for_each_netdev(&init_net, dev) {
1346 if (!is_dn_dev(dev)) 1346 if (!is_dn_dev(dev))
1347 continue; 1347 continue;
1348 1348
@@ -1361,9 +1361,9 @@ static void *dn_dev_seq_next(struct seq_file *seq, void *v, loff_t *pos)
1361 1361
1362 dev = (struct net_device *)v; 1362 dev = (struct net_device *)v;
1363 if (v == SEQ_START_TOKEN) 1363 if (v == SEQ_START_TOKEN)
1364 dev = net_device_entry(&dev_base_head); 1364 dev = net_device_entry(&init_net.dev_base_head);
1365 1365
1366 for_each_netdev_continue(dev) { 1366 for_each_netdev_continue(&init_net, dev) {
1367 if (!is_dn_dev(dev)) 1367 if (!is_dn_dev(dev))
1368 continue; 1368 continue;
1369 1369