/* An I/O port list is used to keep ordering stable and sane, as we don't have any good way to talk about ordering otherwise  */
static int legacy_probe_add(unsigned long port, unsigned int irq, enum controller type, unsigned long private)
/* An I/O port list is used to keep ordering stable and sane, as we don't have any good way to talk about ordering otherwise  */
static int legacy_probe_add(unsigned long port, unsigned int irq, enum controller type, unsigned long private)
{
	struct legacy_probe *lp = &probe_list[0];
	int i;
	struct legacy_probe *free = NULL;
	for (i = 0; i < NR_HOST; i++) {
		if (lp->port == 0 && free == NULL)
			free = lp;
		if (lp->port == port || legacy_port[i] == port) {
			free = lp;
			break;
		}
		lp++;
	}
	if (free == NULL) {
		printk(KERN_ERR "pata_legacy: Too many interfaces.\n");
		return -1;
	}
	free->port = port;
	free->irq = irq;
	free->type = type;
	free->private = private;
	return 0;
}