[NET]: Nuke SET_MODULE_OWNER macro.
[linux-2.6-microblaze.git] / drivers / net / tun.c
index 62b2b30..8b3ec33 100644 (file)
@@ -62,6 +62,7 @@
 #include <linux/if_ether.h>
 #include <linux/if_tun.h>
 #include <linux/crc32.h>
+#include <net/net_namespace.h>
 
 #include <asm/system.h>
 #include <asm/uaccess.h>
@@ -434,7 +435,6 @@ static void tun_setup(struct net_device *dev)
        tun->owner = -1;
        tun->group = -1;
 
-       SET_MODULE_OWNER(dev);
        dev->open = tun_net_open;
        dev->hard_start_xmit = tun_net_xmit;
        dev->stop = tun_net_close;
@@ -475,7 +475,7 @@ static int tun_set_iff(struct file *file, struct ifreq *ifr)
                     !capable(CAP_NET_ADMIN))
                        return -EPERM;
        }
-       else if (__dev_get_by_name(ifr->ifr_name))
+       else if (__dev_get_by_name(&init_net, ifr->ifr_name))
                return -EINVAL;
        else {
                char *name;