aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/ide/arm/rapide.c28
1 files changed, 15 insertions, 13 deletions
diff --git a/drivers/ide/arm/rapide.c b/drivers/ide/arm/rapide.c
index bb081ad53f31..43057e0303c8 100644
--- a/drivers/ide/arm/rapide.c
+++ b/drivers/ide/arm/rapide.c
@@ -48,24 +48,26 @@ rapide_probe(struct expansion_card *ec, const struct ecard_id *id)
48 goto release; 48 goto release;
49 } 49 }
50 50
51 hwif = ide_find_port(); 51 memset(&hw, 0, sizeof(hw));
52 if (hwif) { 52 rapide_setup_ports(&hw, base, base + 0x818, 1 << 6, ec->irq);
53 memset(&hw, 0, sizeof(hw)); 53 hw.chipset = ide_generic;
54 rapide_setup_ports(&hw, base, base + 0x818, 1 << 6, ec->irq); 54 hw.dev = &ec->dev;
55 hw.chipset = ide_generic;
56 hw.dev = &ec->dev;
57 55
58 ide_init_port_hw(hwif, &hw); 56 hwif = ide_find_port();
57 if (hwif == NULL) {
58 ret = -ENOENT;
59 goto release;
60 }
59 61
60 default_hwif_mmiops(hwif); 62 ide_init_port_hw(hwif, &hw);
63 default_hwif_mmiops(hwif);
61 64
62 idx[0] = hwif->index; 65 idx[0] = hwif->index;
63 66
64 ide_device_add(idx, &rapide_port_info); 67 ide_device_add(idx, &rapide_port_info);
65 68
66 ecard_set_drvdata(ec, hwif); 69 ecard_set_drvdata(ec, hwif);
67 goto out; 70 goto out;
68 }
69 71
70 release: 72 release:
71 ecard_release_resources(ec); 73 ecard_release_resources(ec);