ide: fix hwif-s initialization

* Add ide_hwifs[] entry initialization to ide_find_port_slot()
  and remove ide_init_port_data() calls from host drivers.

* Unexport ide_init_port_data().

* Remove no longer needed init_ide_data().

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Tento commit je obsažen v:
Bartlomiej Zolnierkiewicz
2008-07-16 20:33:39 +02:00
rodič 9ad5409375
revize 256c5f8eef
12 změnil soubory, kde provedl 7 přidání a 28 odebrání

Zobrazit soubor

@@ -1473,22 +1473,26 @@ ide_hwif_t *ide_find_port_slot(const struct ide_port_info *d)
for (; i < MAX_HWIFS; i++) {
hwif = &ide_hwifs[i];
if (hwif->chipset == ide_unknown)
return hwif;
goto out_found;
}
} else {
for (i = 2; i < MAX_HWIFS; i++) {
hwif = &ide_hwifs[i];
if (hwif->chipset == ide_unknown)
return hwif;
goto out_found;
}
for (i = 0; i < 2 && i < MAX_HWIFS; i++) {
hwif = &ide_hwifs[i];
if (hwif->chipset == ide_unknown)
return hwif;
goto out_found;
}
}
return NULL;
out_found:
ide_init_port_data(hwif, i);
return hwif;
}
EXPORT_SYMBOL_GPL(ide_find_port_slot);