diff options
Diffstat (limited to 'drivers/ide/legacy/dtc2278.c')
-rw-r--r-- | drivers/ide/legacy/dtc2278.c | 27 |
1 files changed, 1 insertions, 26 deletions
diff --git a/drivers/ide/legacy/dtc2278.c b/drivers/ide/legacy/dtc2278.c index a14abb2c23ed..92d119ba92af 100644 --- a/drivers/ide/legacy/dtc2278.c +++ b/drivers/ide/legacy/dtc2278.c | |||
@@ -106,9 +106,6 @@ static const struct ide_port_info dtc2278_port_info __initdata = { | |||
106 | static int __init dtc2278_probe(void) | 106 | static int __init dtc2278_probe(void) |
107 | { | 107 | { |
108 | unsigned long flags; | 108 | unsigned long flags; |
109 | ide_hwif_t *hwif, *mate; | ||
110 | static u8 idx[4] = { 0xff, 0xff, 0xff, 0xff }; | ||
111 | hw_regs_t hw[2]; | ||
112 | 109 | ||
113 | local_irq_save(flags); | 110 | local_irq_save(flags); |
114 | /* | 111 | /* |
@@ -128,29 +125,7 @@ static int __init dtc2278_probe(void) | |||
128 | #endif | 125 | #endif |
129 | local_irq_restore(flags); | 126 | local_irq_restore(flags); |
130 | 127 | ||
131 | memset(&hw, 0, sizeof(hw)); | 128 | return ide_legacy_device_add(&dtc2278_port_info); |
132 | |||
133 | ide_std_init_ports(&hw[0], 0x1f0, 0x3f6); | ||
134 | hw[0].irq = 14; | ||
135 | |||
136 | ide_std_init_ports(&hw[1], 0x170, 0x376); | ||
137 | hw[1].irq = 15; | ||
138 | |||
139 | hwif = ide_find_port(); | ||
140 | if (hwif) { | ||
141 | ide_init_port_hw(hwif, &hw[0]); | ||
142 | idx[0] = hwif->index; | ||
143 | } | ||
144 | |||
145 | mate = ide_find_port(); | ||
146 | if (mate) { | ||
147 | ide_init_port_hw(mate, &hw[1]); | ||
148 | idx[1] = mate->index; | ||
149 | } | ||
150 | |||
151 | ide_device_add(idx, &dtc2278_port_info); | ||
152 | |||
153 | return 0; | ||
154 | } | 129 | } |
155 | 130 | ||
156 | int probe_dtc2278 = 0; | 131 | int probe_dtc2278 = 0; |