diff options
Diffstat (limited to 'drivers/ide/arm/rapide.c')
-rw-r--r-- | drivers/ide/arm/rapide.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/drivers/ide/arm/rapide.c b/drivers/ide/arm/rapide.c index a45c2f694949..11f3307385de 100644 --- a/drivers/ide/arm/rapide.c +++ b/drivers/ide/arm/rapide.c | |||
@@ -32,11 +32,10 @@ static void rapide_setup_ports(hw_regs_t *hw, void __iomem *base, | |||
32 | static int __devinit | 32 | static int __devinit |
33 | rapide_probe(struct expansion_card *ec, const struct ecard_id *id) | 33 | rapide_probe(struct expansion_card *ec, const struct ecard_id *id) |
34 | { | 34 | { |
35 | ide_hwif_t *hwif; | ||
36 | void __iomem *base; | 35 | void __iomem *base; |
36 | struct ide_host *host; | ||
37 | int ret; | 37 | int ret; |
38 | hw_regs_t hw, *hws[] = { &hw, NULL, NULL, NULL }; | 38 | hw_regs_t hw, *hws[] = { &hw, NULL, NULL, NULL }; |
39 | u8 idx[4] = { 0xff, 0xff, 0xff, 0xff }; | ||
40 | 39 | ||
41 | ret = ecard_request_resources(ec); | 40 | ret = ecard_request_resources(ec); |
42 | if (ret) | 41 | if (ret) |
@@ -53,17 +52,15 @@ rapide_probe(struct expansion_card *ec, const struct ecard_id *id) | |||
53 | hw.chipset = ide_generic; | 52 | hw.chipset = ide_generic; |
54 | hw.dev = &ec->dev; | 53 | hw.dev = &ec->dev; |
55 | 54 | ||
56 | hwif = ide_find_port(); | 55 | host = ide_host_alloc(&rapide_port_info, hws); |
57 | if (hwif == NULL) { | 56 | if (host == NULL) { |
58 | ret = -ENOENT; | 57 | ret = -ENOENT; |
59 | goto release; | 58 | goto release; |
60 | } | 59 | } |
61 | 60 | ||
62 | idx[0] = hwif->index; | 61 | ide_host_register(host, &rapide_port_info, hws); |
63 | 62 | ||
64 | ide_device_add(idx, &rapide_port_info, hws); | 63 | ecard_set_drvdata(ec, host); |
65 | |||
66 | ecard_set_drvdata(ec, hwif); | ||
67 | goto out; | 64 | goto out; |
68 | 65 | ||
69 | release: | 66 | release: |
@@ -74,11 +71,11 @@ rapide_probe(struct expansion_card *ec, const struct ecard_id *id) | |||
74 | 71 | ||
75 | static void __devexit rapide_remove(struct expansion_card *ec) | 72 | static void __devexit rapide_remove(struct expansion_card *ec) |
76 | { | 73 | { |
77 | ide_hwif_t *hwif = ecard_get_drvdata(ec); | 74 | struct ide_host *host = ecard_get_drvdata(ec); |
78 | 75 | ||
79 | ecard_set_drvdata(ec, NULL); | 76 | ecard_set_drvdata(ec, NULL); |
80 | 77 | ||
81 | ide_unregister(hwif); | 78 | ide_host_remove(host); |
82 | 79 | ||
83 | ecard_release_resources(ec); | 80 | ecard_release_resources(ec); |
84 | } | 81 | } |