diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-07-16 14:33:39 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-07-16 14:33:39 -0400 |
commit | 256c5f8eef7b9a8c8a85c15c58cda9df455f947e (patch) | |
tree | cecc145a78f140de8e623b1563c4d758290e2ae8 /drivers/ide/ide-probe.c | |
parent | 9ad540937554a3779c5fe7af13aa390b1d2aeb3e (diff) |
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>
Diffstat (limited to 'drivers/ide/ide-probe.c')
-rw-r--r-- | drivers/ide/ide-probe.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c index d21e51a02c3e..592d424412ea 100644 --- a/drivers/ide/ide-probe.c +++ b/drivers/ide/ide-probe.c | |||
@@ -1473,22 +1473,26 @@ ide_hwif_t *ide_find_port_slot(const struct ide_port_info *d) | |||
1473 | for (; i < MAX_HWIFS; i++) { | 1473 | for (; i < MAX_HWIFS; i++) { |
1474 | hwif = &ide_hwifs[i]; | 1474 | hwif = &ide_hwifs[i]; |
1475 | if (hwif->chipset == ide_unknown) | 1475 | if (hwif->chipset == ide_unknown) |
1476 | return hwif; | 1476 | goto out_found; |
1477 | } | 1477 | } |
1478 | } else { | 1478 | } else { |
1479 | for (i = 2; i < MAX_HWIFS; i++) { | 1479 | for (i = 2; i < MAX_HWIFS; i++) { |
1480 | hwif = &ide_hwifs[i]; | 1480 | hwif = &ide_hwifs[i]; |
1481 | if (hwif->chipset == ide_unknown) | 1481 | if (hwif->chipset == ide_unknown) |
1482 | return hwif; | 1482 | goto out_found; |
1483 | } | 1483 | } |
1484 | for (i = 0; i < 2 && i < MAX_HWIFS; i++) { | 1484 | for (i = 0; i < 2 && i < MAX_HWIFS; i++) { |
1485 | hwif = &ide_hwifs[i]; | 1485 | hwif = &ide_hwifs[i]; |
1486 | if (hwif->chipset == ide_unknown) | 1486 | if (hwif->chipset == ide_unknown) |
1487 | return hwif; | 1487 | goto out_found; |
1488 | } | 1488 | } |
1489 | } | 1489 | } |
1490 | 1490 | ||
1491 | return NULL; | 1491 | return NULL; |
1492 | |||
1493 | out_found: | ||
1494 | ide_init_port_data(hwif, i); | ||
1495 | return hwif; | ||
1492 | } | 1496 | } |
1493 | EXPORT_SYMBOL_GPL(ide_find_port_slot); | 1497 | EXPORT_SYMBOL_GPL(ide_find_port_slot); |
1494 | 1498 | ||