move ifxmips uboot to package/
[openwrt.git] / package / switch / src / switch-robo.c
index 28d8de3..779b89f 100644 (file)
@@ -296,7 +296,11 @@ static int robo_probe(char *devname)
        printk(KERN_INFO PFX "Probing device %s: ", devname);
        strcpy(robo.ifr.ifr_name, devname);
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)
        if ((robo.dev = dev_get_by_name(devname)) == NULL) {
+#else
+       if ((robo.dev = dev_get_by_name(&init_net, devname)) == NULL) {
+#endif
                printk("No such device\n");
                return 1;
        }
@@ -524,7 +528,8 @@ static int __init robo_init(void)
 
        device = strdup("ethX");
        for (device[3] = '0'; (device[3] <= '3') && notfound; device[3]++) {
-               notfound = robo_probe(device);
+               if (! switch_device_registered (device))
+                       notfound = robo_probe(device);
        }
        device[3]--;
        
This page took 0.021422 seconds and 4 git commands to generate.