aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/mips
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-04-26 11:36:32 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-04-26 11:36:32 -0400
commit7d9f3d51cf351ac35b4004cc40c7fd885fb30c5c (patch)
tree415179860ac6bd1a7aa1b692343b647aef8fd347 /drivers/ide/mips
parent59bff5ba5529feac3a0214d897b1920cbe4e2278 (diff)
swarm: use ide_find_port()
Cc: Maciej W. Rozycki <macro@linux-mips.org> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/mips')
-rw-r--r--drivers/ide/mips/swarm.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/ide/mips/swarm.c b/drivers/ide/mips/swarm.c
index 956259fc09ba..bbe8d5853348 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)
76 if (!SIBYTE_HAVE_IDE) 76 if (!SIBYTE_HAVE_IDE)
77 return -ENODEV; 77 return -ENODEV;
78 78
79 /* Find an empty slot. */ 79 hwif = ide_find_port();
80 for (i = 0; i < MAX_HWIFS; i++) 80 if (hwif == NULL) {
81 if (!ide_hwifs[i].io_ports[IDE_DATA_OFFSET])
82 break;
83 if (i >= MAX_HWIFS) {
84 printk(KERN_ERR DRV_NAME ": no free slot for interface\n"); 81 printk(KERN_ERR DRV_NAME ": no free slot for interface\n");
85 return -ENOMEM; 82 return -ENOMEM;
86 } 83 }
87 84
88 hwif = ide_hwifs + i;
89
90 base = ioremap(A_IO_EXT_BASE, 0x800); 85 base = ioremap(A_IO_EXT_BASE, 0x800);
91 offset = __raw_readq(base + R_IO_EXT_REG(R_IO_EXT_START_ADDR, IDE_CS)); 86 offset = __raw_readq(base + R_IO_EXT_REG(R_IO_EXT_START_ADDR, IDE_CS));
92 size = __raw_readq(base + R_IO_EXT_REG(R_IO_EXT_MULT_SIZE, IDE_CS)); 87 size = __raw_readq(base + R_IO_EXT_REG(R_IO_EXT_MULT_SIZE, IDE_CS));