Skip to content

Commit

Permalink
ide: fix ide_register_hw() to check hwif->io_ports[]
Browse files Browse the repository at this point in the history
hwif->hw.io_ports[] and hwif->io_ports[] should be the same but "4drives"
support and scc_pata host driver set only hwif->io_ports[].

To compensate for this check hwif->io_ports[] instead of hwif->hw.io_ports[]
in ide_register_hw() (instead of fixing "4drives" and scc_pata because hwif->hw
is to be removed).

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
  • Loading branch information
Bartlomiej Zolnierkiewicz committed Oct 19, 2007
1 parent 847ddd2 commit 8f173b5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/ide/ide.c
Original file line number Diff line number Diff line change
Expand Up @@ -707,15 +707,15 @@ int ide_register_hw(hw_regs_t *hw, void (*fixup)(ide_hwif_t *),
do {
for (index = 0; index < MAX_HWIFS; ++index) {
hwif = &ide_hwifs[index];
if (hwif->hw.io_ports[IDE_DATA_OFFSET] == hw->io_ports[IDE_DATA_OFFSET])
if (hwif->io_ports[IDE_DATA_OFFSET] == hw->io_ports[IDE_DATA_OFFSET])
goto found;
}
for (index = 0; index < MAX_HWIFS; ++index) {
hwif = &ide_hwifs[index];
if (hwif->hold)
continue;
if ((!hwif->present && !hwif->mate && !initializing) ||
(!hwif->hw.io_ports[IDE_DATA_OFFSET] && initializing))
(!hwif->io_ports[IDE_DATA_OFFSET] && initializing))
goto found;
}
for (index = 0; index < MAX_HWIFS; index++)
Expand Down

0 comments on commit 8f173b5

Please sign in to comment.