swarm: use ide_find_port()

Cc: Maciej W. Rozycki <macro@linux-mips.org>
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
parent 59bff5ba
...@@ -76,17 +76,12 @@ static int __devinit swarm_ide_probe(struct device *dev) ...@@ -76,17 +76,12 @@ static int __devinit swarm_ide_probe(struct device *dev)
if (!SIBYTE_HAVE_IDE) if (!SIBYTE_HAVE_IDE)
return -ENODEV; return -ENODEV;
/* Find an empty slot. */ hwif = ide_find_port();
for (i = 0; i < MAX_HWIFS; i++) if (hwif == NULL) {
if (!ide_hwifs[i].io_ports[IDE_DATA_OFFSET])
break;
if (i >= MAX_HWIFS) {
printk(KERN_ERR DRV_NAME ": no free slot for interface\n"); printk(KERN_ERR DRV_NAME ": no free slot for interface\n");
return -ENOMEM; return -ENOMEM;
} }
hwif = ide_hwifs + i;
base = ioremap(A_IO_EXT_BASE, 0x800); base = ioremap(A_IO_EXT_BASE, 0x800);
offset = __raw_readq(base + R_IO_EXT_REG(R_IO_EXT_START_ADDR, IDE_CS)); offset = __raw_readq(base + R_IO_EXT_REG(R_IO_EXT_START_ADDR, IDE_CS));
size = __raw_readq(base + R_IO_EXT_REG(R_IO_EXT_MULT_SIZE, IDE_CS)); size = __raw_readq(base + R_IO_EXT_REG(R_IO_EXT_MULT_SIZE, IDE_CS));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment