aboutsummaryrefslogtreecommitdiff
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.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/ide/mips/swarm.c b/drivers/ide/mips/swarm.c
index b12d9d22483..badf79fc9e3 100644
--- a/drivers/ide/mips/swarm.c
+++ b/drivers/ide/mips/swarm.c
@@ -75,7 +75,7 @@ static int __devinit swarm_ide_probe(struct device *dev)
u8 __iomem *base;
struct ide_host *host;
phys_t offset, size;
- int i;
+ int i, rc;
hw_regs_t hw, *hws[] = { &hw, NULL, NULL, NULL };
if (!SIBYTE_HAVE_IDE)
@@ -115,19 +115,17 @@ static int __devinit swarm_ide_probe(struct device *dev)
hw.irq = K_INT_GB_IDE;
hw.chipset = ide_generic;
- host = ide_host_alloc(&swarm_port_info, hws);
- if (host == NULL)
+ rc = ide_host_add(&swarm_port_info, hws, &host);
+ if (rc)
goto err;
- ide_host_register(host, &swarm_port_info, hws);
-
dev_set_drvdata(dev, host);
return 0;
err:
release_resource(&swarm_ide_resource);
iounmap(base);
- return -ENOMEM;
+ return rc;
}
static struct device_driver swarm_ide_driver = {