diff options
Diffstat (limited to 'drivers/ide/pci')
-rw-r--r-- | drivers/ide/pci/cs5520.c | 22 | ||||
-rw-r--r-- | drivers/ide/pci/sgiioc4.c | 8 |
2 files changed, 7 insertions, 23 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 | ||
155 | static int __devinit cs5520_init_one(struct pci_dev *dev, const struct pci_device_id *id) | 155 | static 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 | } |
diff --git a/drivers/ide/pci/sgiioc4.c b/drivers/ide/pci/sgiioc4.c index 5af74ea1d46e..f6d4b4136a89 100644 --- a/drivers/ide/pci/sgiioc4.c +++ b/drivers/ide/pci/sgiioc4.c | |||
@@ -614,6 +614,7 @@ sgiioc4_ide_setup_pci_device(struct pci_dev *dev) | |||
614 | void __iomem *virt_base; | 614 | void __iomem *virt_base; |
615 | ide_hwif_t *hwif; | 615 | ide_hwif_t *hwif; |
616 | int h; | 616 | int h; |
617 | u8 idx[4] = { 0xff, 0xff, 0xff, 0xff }; | ||
617 | 618 | ||
618 | /* | 619 | /* |
619 | * Find an empty HWIF; if none available, return -ENOMEM. | 620 | * Find an empty HWIF; if none available, return -ENOMEM. |
@@ -679,11 +680,10 @@ sgiioc4_ide_setup_pci_device(struct pci_dev *dev) | |||
679 | 680 | ||
680 | ide_init_sgiioc4(hwif); | 681 | ide_init_sgiioc4(hwif); |
681 | 682 | ||
682 | if (probe_hwif_init(hwif)) | 683 | idx[0] = hwif->index; |
683 | return -EIO; | ||
684 | 684 | ||
685 | /* Create /proc/ide entries */ | 685 | if (ide_device_add(idx)) |
686 | ide_proc_register_port(hwif); | 686 | return -EIO; |
687 | 687 | ||
688 | return 0; | 688 | return 0; |
689 | } | 689 | } |