diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-04-26 11:36:36 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-04-26 11:36:36 -0400 |
commit | e277f91fef8a0ff7726ad33eb79c6f0d0c6229a8 (patch) | |
tree | d275b5e0c720c5db73efa446c86a2437fd93dca2 /drivers/ide/ide-probe.c | |
parent | fe80b937c9917887e4fbfaaf52f498b5ac3a6999 (diff) |
ide: use ide_find_port() in legacy VLB host drivers (take 2)
* Add IDE_HFLAG_QD_2ND_PORT host flag to indicate the need of skipping
first ide_hwifs[] slot for the second port of QD65xx controller.
* Handle this new host flag in ide_find_port_slot().
* Convert legacy VLB host drivers to use ide_find_port().
While at it:
* Fix couple of printk()-s in qd65xx host driver to not use hwif->name.
v2:
* Fix qd65xx.
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-probe.c')
-rw-r--r-- | drivers/ide/ide-probe.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c index f81793f3f247..875429728021 100644 --- a/drivers/ide/ide-probe.c +++ b/drivers/ide/ide-probe.c | |||
@@ -1468,7 +1468,9 @@ ide_hwif_t *ide_find_port_slot(const struct ide_port_info *d) | |||
1468 | * ports 0x1f0/0x170 (the ide0/ide1 defaults). | 1468 | * ports 0x1f0/0x170 (the ide0/ide1 defaults). |
1469 | */ | 1469 | */ |
1470 | if (bootable) { | 1470 | if (bootable) { |
1471 | for (i = 0; i < MAX_HWIFS; i++) { | 1471 | i = (d && (d->host_flags & IDE_HFLAG_QD_2ND_PORT)) ? 1 : 0; |
1472 | |||
1473 | for (; i < MAX_HWIFS; i++) { | ||
1472 | hwif = &ide_hwifs[i]; | 1474 | hwif = &ide_hwifs[i]; |
1473 | if (hwif->chipset == ide_unknown) | 1475 | if (hwif->chipset == ide_unknown) |
1474 | return hwif; | 1476 | return hwif; |