aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci/cs5520.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/pci/cs5520.c')
-rw-r--r--drivers/ide/pci/cs5520.c22
1 files changed, 3 insertions, 19 deletions
diff --git a/drivers/ide/pci/cs5520.c b/drivers/ide/pci/cs5520.c
index aa98e817d385..a9e1cafee69e 100644
--- a/drivers/ide/pci/cs5520.c
+++ b/drivers/ide/pci/cs5520.c
@@ -154,9 +154,8 @@ static ide_pci_device_t cyrix_chipsets[] __devinitdata = {
154 154
155static int __devinit cs5520_init_one(struct pci_dev *dev, const struct pci_device_id *id) 155static int __devinit cs5520_init_one(struct pci_dev *dev, const struct pci_device_id *id)
156{ 156{
157 ide_hwif_t *hwif = NULL, *mate = NULL;
158 ata_index_t index;
159 ide_pci_device_t *d = &cyrix_chipsets[id->driver_data]; 157 ide_pci_device_t *d = &cyrix_chipsets[id->driver_data];
158 u8 idx[4] = { 0xff, 0xff, 0xff, 0xff };
160 159
161 ide_setup_pci_noise(dev, d); 160 ide_setup_pci_noise(dev, d);
162 161
@@ -172,29 +171,14 @@ static int __devinit cs5520_init_one(struct pci_dev *dev, const struct pci_devic
172 return -ENODEV; 171 return -ENODEV;
173 } 172 }
174 173
175 index.all = 0xf0f0;
176
177 /* 174 /*
178 * Now the chipset is configured we can let the core 175 * Now the chipset is configured we can let the core
179 * do all the device setup for us 176 * do all the device setup for us
180 */ 177 */
181 178
182 ide_pci_setup_ports(dev, d, 14, &index); 179 ide_pci_setup_ports(dev, d, 14, &idx[0]);
183
184 if ((index.b.low & 0xf0) != 0xf0)
185 hwif = &ide_hwifs[index.b.low];
186 if ((index.b.high & 0xf0) != 0xf0)
187 mate = &ide_hwifs[index.b.high];
188
189 if (hwif)
190 probe_hwif_init(hwif);
191 if (mate)
192 probe_hwif_init(mate);
193 180
194 if (hwif) 181 ide_device_add(idx);
195 ide_proc_register_port(hwif);
196 if (mate)
197 ide_proc_register_port(mate);
198 182
199 return 0; 183 return 0;
200} 184}