Esempio n. 1
0
/* This is set up so that only a single autoprobe takes place per call.
ISA device autoprobes on a running machine are not recommended. */
int
init_module(void)
{
    int this_dev, found = 0;

    for (this_dev = 0; this_dev < MAX_EL2_CARDS; this_dev++) {
        struct device *dev = &dev_el2[this_dev];
        dev->name = namelist+(NAMELEN*this_dev);
        dev->irq = irq[this_dev];
        dev->base_addr = io[this_dev];
        dev->mem_end = xcvr[this_dev];	/* low 4bits = xcvr sel. */
        dev->init = el2_probe;
        if (io[this_dev] == 0)  {
            if (this_dev != 0) break; /* only autoprobe 1st one */
            printk(KERN_NOTICE "3c503.c: Presently autoprobing (not recommended) for a single card.\n");
        }
        if (register_netdev(dev) != 0) {
            printk(KERN_WARNING "3c503.c: No 3c503 card found (i/o = 0x%x).\n", io[this_dev]);
            if (found != 0) {	/* Got at least one. */
                lock_8390_module();
                return 0;
            }
            return -ENXIO;
        }
        found++;
    }
    lock_8390_module();
    return 0;
}
Esempio n. 2
0
int init_module(void)
{
	if (mac8390_probe(NULL)) {
		printk(KERN_NOTICE "mac8390.c: No useable cards found, driver NOT installed.\n");
		return -ENODEV;
	}
	lock_8390_module();
	return 0;
}