int __init fmv18x_probe(struct net_device *dev) { int i; int base_addr = dev->base_addr; SET_MODULE_OWNER(dev); if (base_addr > 0x1ff) /* Check a single specified location. */ return fmv18x_probe1(dev, base_addr); else if (base_addr != 0) /* Don't probe at all. */ return -ENXIO; for (i = 0; fmv18x_probe_list[i]; i++) if (fmv18x_probe1(dev, fmv18x_probe_list[i]) == 0) return 0; return -ENODEV; }
int fmv18x_probe(struct device *dev) { int i; int base_addr = dev ? dev->base_addr : 0; if (base_addr > 0x1ff) /* Check a single specified location. */ return fmv18x_probe1(dev, base_addr); else if (base_addr != 0) /* Don't probe at all. */ return ENXIO; for (i = 0; fmv18x_probe_list[i]; i++) { int ioaddr = fmv18x_probe_list[i]; if (check_region(ioaddr, FMV18X_IO_EXTENT)) continue; if (fmv18x_probe1(dev, ioaddr) == 0) return 0; } return ENODEV; }