diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-04-26 17:36:32 +0200 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-04-26 17:36:32 +0200 |
commit | 7d9f3d51cf351ac35b4004cc40c7fd885fb30c5c (patch) | |
tree | 415179860ac6bd1a7aa1b692343b647aef8fd347 | |
parent | 59bff5ba5529feac3a0214d897b1920cbe4e2278 (diff) | |
download | op-kernel-dev-7d9f3d51cf351ac35b4004cc40c7fd885fb30c5c.zip op-kernel-dev-7d9f3d51cf351ac35b4004cc40c7fd885fb30c5c.tar.gz |
swarm: use ide_find_port()
Cc: Maciej W. Rozycki <macro@linux-mips.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
-rw-r--r-- | drivers/ide/mips/swarm.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/ide/mips/swarm.c b/drivers/ide/mips/swarm.c index 956259f..bbe8d58 100644 --- a/drivers/ide/mips/swarm.c +++ b/drivers/ide/mips/swarm.c @@ -76,17 +76,12 @@ static int __devinit swarm_ide_probe(struct device *dev) if (!SIBYTE_HAVE_IDE) return -ENODEV; - /* Find an empty slot. */ - for (i = 0; i < MAX_HWIFS; i++) - if (!ide_hwifs[i].io_ports[IDE_DATA_OFFSET]) - break; - if (i >= MAX_HWIFS) { + hwif = ide_find_port(); + if (hwif == NULL) { printk(KERN_ERR DRV_NAME ": no free slot for interface\n"); return -ENOMEM; } - hwif = ide_hwifs + i; - base = ioremap(A_IO_EXT_BASE, 0x800); 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)); |