aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/setup-pci.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-10-19 18:32:33 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-10-19 18:32:33 -0400
commit9239b333939dd1e5b1a9f033a1c136273d58efe8 (patch)
treec7eb49e04a549ea709cd98ddf6df66a091a062d6 /drivers/ide/setup-pci.c
parent18e181fe13b7340194d09e6dd7f571a5f96f0367 (diff)
ide: remove write-only hwif->hw
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/setup-pci.c')
-rw-r--r--drivers/ide/setup-pci.c11
1 files changed, 6 insertions, 5 deletions
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,
387 return NULL; /* no room in ide_hwifs[] */ 387 return NULL; /* no room in ide_hwifs[] */
388 if (hwif->io_ports[IDE_DATA_OFFSET] != base || 388 if (hwif->io_ports[IDE_DATA_OFFSET] != base ||
389 hwif->io_ports[IDE_CONTROL_OFFSET] != (ctl | 2)) { 389 hwif->io_ports[IDE_CONTROL_OFFSET] != (ctl | 2)) {
390 memset(&hwif->hw, 0, sizeof(hwif->hw)); 390 hw_regs_t hw;
391
392 memset(&hw, 0, sizeof(hw));
391#ifndef CONFIG_IDE_ARCH_OBSOLETE_INIT 393#ifndef CONFIG_IDE_ARCH_OBSOLETE_INIT
392 ide_std_init_ports(&hwif->hw, base, (ctl | 2)); 394 ide_std_init_ports(&hw, base, ctl | 2);
393 hwif->hw.io_ports[IDE_IRQ_OFFSET] = 0;
394#else 395#else
395 ide_init_hwif_ports(&hwif->hw, base, (ctl | 2), NULL); 396 ide_init_hwif_ports(&hw, base, ctl | 2, NULL);
396#endif 397#endif
397 memcpy(hwif->io_ports, hwif->hw.io_ports, sizeof(hwif->io_ports)); 398 memcpy(hwif->io_ports, hw.io_ports, sizeof(hwif->io_ports));
398 hwif->noprobe = !hwif->io_ports[IDE_DATA_OFFSET]; 399 hwif->noprobe = !hwif->io_ports[IDE_DATA_OFFSET];
399 } 400 }
400 hwif->chipset = d->chipset ? d->chipset : ide_pci; 401 hwif->chipset = d->chipset ? d->chipset : ide_pci;