diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/ide/pci/sgiioc4.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/drivers/ide/pci/sgiioc4.c b/drivers/ide/pci/sgiioc4.c index 9fb35c528d54..b188efcd3551 100644 --- a/drivers/ide/pci/sgiioc4.c +++ b/drivers/ide/pci/sgiioc4.c | |||
@@ -593,6 +593,7 @@ sgiioc4_ide_setup_pci_device(struct pci_dev *dev) | |||
593 | ide_hwif_t *hwif; | 593 | ide_hwif_t *hwif; |
594 | int h; | 594 | int h; |
595 | u8 idx[4] = { 0xff, 0xff, 0xff, 0xff }; | 595 | u8 idx[4] = { 0xff, 0xff, 0xff, 0xff }; |
596 | hw_regs_t hw; | ||
596 | 597 | ||
597 | /* | 598 | /* |
598 | * Find an empty HWIF; if none available, return -ENOMEM. | 599 | * Find an empty HWIF; if none available, return -ENOMEM. |
@@ -632,15 +633,11 @@ sgiioc4_ide_setup_pci_device(struct pci_dev *dev) | |||
632 | return -ENOMEM; | 633 | return -ENOMEM; |
633 | } | 634 | } |
634 | 635 | ||
635 | if (hwif->io_ports[IDE_DATA_OFFSET] != cmd_base) { | 636 | /* Initialize the IO registers */ |
636 | hw_regs_t hw; | 637 | memset(&hw, 0, sizeof(hw)); |
637 | 638 | sgiioc4_init_hwif_ports(&hw, cmd_base, ctl, irqport); | |
638 | /* Initialize the IO registers */ | 639 | memcpy(hwif->io_ports, hw.io_ports, sizeof(hwif->io_ports)); |
639 | memset(&hw, 0, sizeof(hw)); | 640 | hwif->noprobe = 0; |
640 | sgiioc4_init_hwif_ports(&hw, cmd_base, ctl, irqport); | ||
641 | memcpy(hwif->io_ports, hw.io_ports, sizeof(hwif->io_ports)); | ||
642 | hwif->noprobe = !hwif->io_ports[IDE_DATA_OFFSET]; | ||
643 | } | ||
644 | 641 | ||
645 | hwif->irq = dev->irq; | 642 | hwif->irq = dev->irq; |
646 | hwif->chipset = ide_pci; | 643 | hwif->chipset = ide_pci; |