Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ide: fix ide_register_hw() to check hwif->io_ports[]

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>

+2 -2
+2 -2
drivers/ide/ide.c
··· 707 707 do { 708 708 for (index = 0; index < MAX_HWIFS; ++index) { 709 709 hwif = &ide_hwifs[index]; 710 - if (hwif->hw.io_ports[IDE_DATA_OFFSET] == hw->io_ports[IDE_DATA_OFFSET]) 710 + if (hwif->io_ports[IDE_DATA_OFFSET] == hw->io_ports[IDE_DATA_OFFSET]) 711 711 goto found; 712 712 } 713 713 for (index = 0; index < MAX_HWIFS; ++index) { ··· 715 715 if (hwif->hold) 716 716 continue; 717 717 if ((!hwif->present && !hwif->mate && !initializing) || 718 - (!hwif->hw.io_ports[IDE_DATA_OFFSET] && initializing)) 718 + (!hwif->io_ports[IDE_DATA_OFFSET] && initializing)) 719 719 goto found; 720 720 } 721 721 for (index = 0; index < MAX_HWIFS; index++)