ide: add ide_host_add() helper
[deliverable/linux.git] / drivers / ide / h8300 / ide-h8300.c
index 15f76690a48cfccce5d5c2dbdee69f66d413fd08..bde7a585f1987e3488e318982754143399a3709e 100644 (file)
@@ -191,7 +191,6 @@ static const struct ide_port_info h8300_port_info = {
 
 static int __init h8300_ide_init(void)
 {
-       struct ide_host *host;
        hw_regs_t hw, *hws[] = { &hw, NULL, NULL, NULL };
 
        printk(KERN_INFO DRV_NAME ": H8/300 generic IDE interface\n");
@@ -205,13 +204,7 @@ static int __init h8300_ide_init(void)
 
        hw_setup(&hw);
 
-       host = ide_host_alloc(&h8300_port_info, hws);
-       if (host == NULL)
-               return -ENOENT;
-
-       ide_host_register(host, &h8300_port_info, hws);
-
-       return 0;
+       return ide_host_add(&h8300_port_info, hws, NULL);
 
 out_busy:
        printk(KERN_ERR "ide-h8300: IDE I/F resource already used.\n");
This page took 0.025358 seconds and 5 git commands to generate.