diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2007-10-20 00:32:33 +0200 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2007-10-20 00:32:33 +0200 |
commit | 9239b333939dd1e5b1a9f033a1c136273d58efe8 (patch) | |
tree | c7eb49e04a549ea709cd98ddf6df66a091a062d6 /drivers/ide/pci | |
parent | 18e181fe13b7340194d09e6dd7f571a5f96f0367 (diff) |
ide: remove write-only hwif->hw
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/pci')
-rw-r--r-- | drivers/ide/pci/sgiioc4.c | 8 | ||||
-rw-r--r-- | drivers/ide/pci/siimage.c | 11 |
2 files changed, 8 insertions, 11 deletions
diff --git a/drivers/ide/pci/sgiioc4.c b/drivers/ide/pci/sgiioc4.c index f6d4b4136a8..de820aa58cd 100644 --- a/drivers/ide/pci/sgiioc4.c +++ b/drivers/ide/pci/sgiioc4.c @@ -655,10 +655,12 @@ sgiioc4_ide_setup_pci_device(struct pci_dev *dev) } if (hwif->io_ports[IDE_DATA_OFFSET] != cmd_base) { + hw_regs_t hw; + /* Initialize the IO registers */ - sgiioc4_init_hwif_ports(&hwif->hw, cmd_base, ctl, irqport); - memcpy(hwif->io_ports, hwif->hw.io_ports, - sizeof (hwif->io_ports)); + memset(&hw, 0, sizeof(hw)); + sgiioc4_init_hwif_ports(&hw, cmd_base, ctl, irqport); + memcpy(hwif->io_ports, hw.io_ports, sizeof(hwif->io_ports)); hwif->noprobe = !hwif->io_ports[IDE_DATA_OFFSET]; } diff --git a/drivers/ide/pci/siimage.c b/drivers/ide/pci/siimage.c index 463bfda8426..732043b4deb 100644 --- a/drivers/ide/pci/siimage.c +++ b/drivers/ide/pci/siimage.c @@ -754,16 +754,11 @@ static void __devinit init_mmio_iops_siimage(ide_hwif_t *hwif) hwif->sata_misc[SATA_IEN_OFFSET] = base + 0x148; } - hw.irq = hwif->pci_dev->irq; + memcpy(hwif->io_ports, hw.io_ports, sizeof(hwif->io_ports)); - memcpy(&hwif->hw, &hw, sizeof(hw)); - memcpy(hwif->io_ports, hwif->hw.io_ports, sizeof(hwif->hw.io_ports)); + hwif->irq = dev->irq; - hwif->irq = hw.irq; - - base = (unsigned long) addr; - - hwif->dma_base = base + (ch ? 0x08 : 0x00); + hwif->dma_base = (unsigned long)addr + (ch ? 0x08 : 0x00); hwif->mmio = 1; } |