aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/ide.c')
-rw-r--r--drivers/ide/ide.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c
index 917c72dcd33d..4ca511156a11 100644
--- a/drivers/ide/ide.c
+++ b/drivers/ide/ide.c
@@ -232,28 +232,19 @@ static int ide_system_bus_speed(void)
232 return pci_dev_present(pci_default) ? 33 : 50; 232 return pci_dev_present(pci_default) ? 33 : 50;
233} 233}
234 234
235ide_hwif_t * ide_find_port(unsigned long base) 235ide_hwif_t *ide_find_port(void)
236{ 236{
237 ide_hwif_t *hwif; 237 ide_hwif_t *hwif;
238 int i; 238 int i;
239 239
240 for (i = 0; i < MAX_HWIFS; i++) { 240 for (i = 0; i < MAX_HWIFS; i++) {
241 hwif = &ide_hwifs[i]; 241 hwif = &ide_hwifs[i];
242 if (hwif->io_ports[IDE_DATA_OFFSET] == base)
243 goto found;
244 }
245
246 for (i = 0; i < MAX_HWIFS; i++) {
247 hwif = &ide_hwifs[i];
248 if (hwif->chipset == ide_unknown) 242 if (hwif->chipset == ide_unknown)
249 goto found; 243 return hwif;
250 } 244 }
251 245
252 hwif = NULL; 246 return NULL;
253found:
254 return hwif;
255} 247}
256
257EXPORT_SYMBOL_GPL(ide_find_port); 248EXPORT_SYMBOL_GPL(ide_find_port);
258 249
259static struct resource* hwif_request_region(ide_hwif_t *hwif, 250static struct resource* hwif_request_region(ide_hwif_t *hwif,