diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-07-24 13:05:50 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-07-24 13:05:50 -0400 |
commit | 698158c799c7961824ccdb773250e16c0dd5d9e4 (patch) | |
tree | 96f034be9e9a95e6f68b5d20d1a3df7a3cbf724a /drivers/ide/arm/rapide.c | |
parent | 4c7827eec78abe6fe68fd29305806467f2a51e63 (diff) | |
parent | 338b9bb3adac0d2c5a1e180491d9b001d624c402 (diff) |
Merge ../linux-2.6
Diffstat (limited to 'drivers/ide/arm/rapide.c')
-rw-r--r-- | drivers/ide/arm/rapide.c | 24 |
1 files changed, 7 insertions, 17 deletions
diff --git a/drivers/ide/arm/rapide.c b/drivers/ide/arm/rapide.c index 43057e0303c8..2bdd8b734afb 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 | u8 idx[4] = { 0xff, 0xff, 0xff, 0xff }; | 38 | hw_regs_t hw, *hws[] = { &hw, NULL, NULL, NULL }; |
39 | hw_regs_t hw; | ||
40 | 39 | ||
41 | ret = ecard_request_resources(ec); | 40 | ret = ecard_request_resources(ec); |
42 | if (ret) | 41 | if (ret) |
@@ -53,20 +52,11 @@ 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 | ret = ide_host_add(&rapide_port_info, hws, &host); |
57 | if (hwif == NULL) { | 56 | if (ret) |
58 | ret = -ENOENT; | ||
59 | goto release; | 57 | goto release; |
60 | } | ||
61 | |||
62 | ide_init_port_hw(hwif, &hw); | ||
63 | default_hwif_mmiops(hwif); | ||
64 | |||
65 | idx[0] = hwif->index; | ||
66 | |||
67 | ide_device_add(idx, &rapide_port_info); | ||
68 | 58 | ||
69 | ecard_set_drvdata(ec, hwif); | 59 | ecard_set_drvdata(ec, host); |
70 | goto out; | 60 | goto out; |
71 | 61 | ||
72 | release: | 62 | release: |
@@ -77,11 +67,11 @@ rapide_probe(struct expansion_card *ec, const struct ecard_id *id) | |||
77 | 67 | ||
78 | static void __devexit rapide_remove(struct expansion_card *ec) | 68 | static void __devexit rapide_remove(struct expansion_card *ec) |
79 | { | 69 | { |
80 | ide_hwif_t *hwif = ecard_get_drvdata(ec); | 70 | struct ide_host *host = ecard_get_drvdata(ec); |
81 | 71 | ||
82 | ecard_set_drvdata(ec, NULL); | 72 | ecard_set_drvdata(ec, NULL); |
83 | 73 | ||
84 | ide_unregister(hwif); | 74 | ide_host_remove(host); |
85 | 75 | ||
86 | ecard_release_resources(ec); | 76 | ecard_release_resources(ec); |
87 | } | 77 | } |