aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/mips/swarm.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/mips/swarm.c')
-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));