]> err.no Git - linux-2.6/blobdiff - drivers/ide/arm/palm_bk3710.c
Merge branch 'sched/for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip...
[linux-2.6] / drivers / ide / arm / palm_bk3710.c
index 0229d794d9099534a0c4b2fa70c0ab33796f732c..65bb4b8fd57086946e02c2c09bf907fa9909980b 100644 (file)
@@ -347,11 +347,10 @@ static int __devinit palm_bk3710_probe(struct platform_device *pdev)
 {
        struct clk *clk;
        struct resource *mem, *irq;
-       ide_hwif_t *hwif;
+       struct ide_host *host;
        unsigned long base, rate;
-       int i;
+       int i, rc;
        hw_regs_t hw, *hws[] = { &hw, NULL, NULL, NULL };
-       u8 idx[4] = { 0xff, 0xff, 0xff, 0xff };
 
        clk = clk_get(NULL, "IDECLK");
        if (IS_ERR(clk))
@@ -393,22 +392,14 @@ static int __devinit palm_bk3710_probe(struct platform_device *pdev)
        hw.irq = irq->start;
        hw.chipset = ide_palm3710;
 
-       hwif = ide_find_port();
-       if (hwif == NULL)
+       rc = ide_host_add(&palm_bk3710_port_info, hws, NULL);
+       if (rc)
                goto out;
 
-       i = hwif->index;
-
-       default_hwif_mmiops(hwif);
-
-       idx[0] = i;
-
-       ide_device_add(idx, &palm_bk3710_port_info, hws);
-
        return 0;
 out:
        printk(KERN_WARNING "Palm Chip BK3710 IDE Register Fail\n");
-       return -ENODEV;
+       return rc;
 }
 
 /* work with hotplug and coldplug */