summaryrefslogtreecommitdiff
path: root/drivers/ide/legacy/ide_platform.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/legacy/ide_platform.c')
-rw-r--r--drivers/ide/legacy/ide_platform.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/ide/legacy/ide_platform.c b/drivers/ide/legacy/ide_platform.c
index 58a942c6a131..051b4ab0f359 100644
--- a/drivers/ide/legacy/ide_platform.c
+++ b/drivers/ide/legacy/ide_platform.c
@@ -99,13 +99,9 @@ static int __devinit plat_ide_probe(struct platform_device *pdev)
if (mmio)
d.host_flags |= IDE_HFLAG_MMIO;
- host = ide_host_alloc(&d, hws);
- if (host == NULL) {
- ret = -ENODEV;
+ ret = ide_host_add(&d, hws, &host);
+ if (ret)
goto out;
- }
-
- ide_host_register(host, &d, hws);
platform_set_drvdata(pdev, host);