From 9239b333939dd1e5b1a9f033a1c136273d58efe8 Mon Sep 17 00:00:00 2001 From: Bartlomiej Zolnierkiewicz Date: Sat, 20 Oct 2007 00:32:33 +0200 Subject: ide: remove write-only hwif->hw Signed-off-by: Bartlomiej Zolnierkiewicz --- drivers/ide/setup-pci.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'drivers/ide/setup-pci.c') diff --git a/drivers/ide/setup-pci.c b/drivers/ide/setup-pci.c index 875167e11cd1..71be6999f967 100644 --- a/drivers/ide/setup-pci.c +++ b/drivers/ide/setup-pci.c @@ -387,14 +387,15 @@ static ide_hwif_t *ide_hwif_configure(struct pci_dev *dev, ide_pci_device_t *d, return NULL; /* no room in ide_hwifs[] */ if (hwif->io_ports[IDE_DATA_OFFSET] != base || hwif->io_ports[IDE_CONTROL_OFFSET] != (ctl | 2)) { - memset(&hwif->hw, 0, sizeof(hwif->hw)); + hw_regs_t hw; + + memset(&hw, 0, sizeof(hw)); #ifndef CONFIG_IDE_ARCH_OBSOLETE_INIT - ide_std_init_ports(&hwif->hw, base, (ctl | 2)); - hwif->hw.io_ports[IDE_IRQ_OFFSET] = 0; + ide_std_init_ports(&hw, base, ctl | 2); #else - ide_init_hwif_ports(&hwif->hw, base, (ctl | 2), NULL); + ide_init_hwif_ports(&hw, base, ctl | 2, NULL); #endif - memcpy(hwif->io_ports, hwif->hw.io_ports, sizeof(hwif->io_ports)); + memcpy(hwif->io_ports, hw.io_ports, sizeof(hwif->io_ports)); hwif->noprobe = !hwif->io_ports[IDE_DATA_OFFSET]; } hwif->chipset = d->chipset ? d->chipset : ide_pci; -- cgit v1.2.3