Commit a696762d authored by David Howells's avatar David Howells Committed by Linus Torvalds

[PATCH] IDE_ARCH_OBSOLETE_INIT fix

The attached patch fixes the IDE driver to initialise correctly in the case
that IDE_ARCH_OBSOLETE_INIT is not defined.  Not defining this macro would
seem to be the correct thing to do since it includes the word "obsolete" in
its name.
Signed-Off-By: default avatarDavid Howells <dhowells@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent e744e6d8
......@@ -433,7 +433,12 @@ static ide_hwif_t *ide_hwif_configure(struct pci_dev *dev, ide_pci_device_t *d,
if (hwif->io_ports[IDE_DATA_OFFSET] != base ||
hwif->io_ports[IDE_CONTROL_OFFSET] != (ctl | 2)) {
memset(&hwif->hw, 0, sizeof(hwif->hw));
#ifndef IDE_ARCH_OBSOLETE_INIT
ide_std_init_ports(&hwif->hw, base, (ctl | 2));
hwif->hw.io_ports[IDE_IRQ_OFFSET] = 0;
#else
ide_init_hwif_ports(&hwif->hw, base, (ctl | 2), NULL);
#endif
memcpy(hwif->io_ports, hwif->hw.io_ports, sizeof(hwif->io_ports));
hwif->noprobe = !hwif->io_ports[IDE_DATA_OFFSET];
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment