Beispiel #1
0
int __init hp_plus_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 hpp_probe1(dev, base_addr);
	else if (base_addr != 0)	/* Don't probe at all. */
		return -ENXIO;

	for (i = 0; hpplus_portlist[i]; i++)
		if (hpp_probe1(dev, hpplus_portlist[i]) == 0)
			return 0;

	return -ENODEV;
}
Beispiel #2
0
static int __init do_hpp_probe(struct net_device *dev)
{
	int i;
	int base_addr = dev->base_addr;
	int irq = dev->irq;

	if (base_addr > 0x1ff)		/* Check a single specified location. */
		return hpp_probe1(dev, base_addr);
	else if (base_addr != 0)	/* Don't probe at all. */
		return -ENXIO;

	for (i = 0; hpplus_portlist[i]; i++) {
		if (hpp_probe1(dev, hpplus_portlist[i]) == 0)
			return 0;
		dev->irq = irq;
	}

	return -ENODEV;
}
Beispiel #3
0
int hp_plus_probe(struct device *dev)
{
	int i;
	int base_addr = dev ? dev->base_addr : 0;

	if (base_addr > 0x1ff)		/* Check a single specified location. */
		return hpp_probe1(dev, base_addr);
	else if (base_addr != 0)	/* Don't probe at all. */
		return ENXIO;

	for (i = 0; hpplus_portlist[i]; i++) {
		int ioaddr = hpplus_portlist[i];
		if (check_region(ioaddr, HP_IO_EXTENT))
			continue;
		if (hpp_probe1(dev, ioaddr) == 0)
			return 0;
	}

	return ENODEV;
}