diff options
Diffstat (limited to 'drivers/ide/pci/sgiioc4.c')
-rw-r--r-- | drivers/ide/pci/sgiioc4.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/ide/pci/sgiioc4.c b/drivers/ide/pci/sgiioc4.c index 5af74ea1d46e..de820aa58cd0 100644 --- a/drivers/ide/pci/sgiioc4.c +++ b/drivers/ide/pci/sgiioc4.c | |||
@@ -614,6 +614,7 @@ sgiioc4_ide_setup_pci_device(struct pci_dev *dev) | |||
614 | void __iomem *virt_base; | 614 | void __iomem *virt_base; |
615 | ide_hwif_t *hwif; | 615 | ide_hwif_t *hwif; |
616 | int h; | 616 | int h; |
617 | u8 idx[4] = { 0xff, 0xff, 0xff, 0xff }; | ||
617 | 618 | ||
618 | /* | 619 | /* |
619 | * Find an empty HWIF; if none available, return -ENOMEM. | 620 | * Find an empty HWIF; if none available, return -ENOMEM. |
@@ -654,10 +655,12 @@ sgiioc4_ide_setup_pci_device(struct pci_dev *dev) | |||
654 | } | 655 | } |
655 | 656 | ||
656 | if (hwif->io_ports[IDE_DATA_OFFSET] != cmd_base) { | 657 | if (hwif->io_ports[IDE_DATA_OFFSET] != cmd_base) { |
658 | hw_regs_t hw; | ||
659 | |||
657 | /* Initialize the IO registers */ | 660 | /* Initialize the IO registers */ |
658 | sgiioc4_init_hwif_ports(&hwif->hw, cmd_base, ctl, irqport); | 661 | memset(&hw, 0, sizeof(hw)); |
659 | memcpy(hwif->io_ports, hwif->hw.io_ports, | 662 | sgiioc4_init_hwif_ports(&hw, cmd_base, ctl, irqport); |
660 | sizeof (hwif->io_ports)); | 663 | memcpy(hwif->io_ports, hw.io_ports, sizeof(hwif->io_ports)); |
661 | hwif->noprobe = !hwif->io_ports[IDE_DATA_OFFSET]; | 664 | hwif->noprobe = !hwif->io_ports[IDE_DATA_OFFSET]; |
662 | } | 665 | } |
663 | 666 | ||
@@ -679,11 +682,10 @@ sgiioc4_ide_setup_pci_device(struct pci_dev *dev) | |||
679 | 682 | ||
680 | ide_init_sgiioc4(hwif); | 683 | ide_init_sgiioc4(hwif); |
681 | 684 | ||
682 | if (probe_hwif_init(hwif)) | 685 | idx[0] = hwif->index; |
683 | return -EIO; | ||
684 | 686 | ||
685 | /* Create /proc/ide entries */ | 687 | if (ide_device_add(idx)) |
686 | ide_proc_register_port(hwif); | 688 | return -EIO; |
687 | 689 | ||
688 | return 0; | 690 | return 0; |
689 | } | 691 | } |