diff options
Diffstat (limited to 'drivers/ide/ide.c')
-rw-r--r-- | drivers/ide/ide.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c index 8ef521f66f87..98bd45e8c175 100644 --- a/drivers/ide/ide.c +++ b/drivers/ide/ide.c | |||
@@ -675,6 +675,17 @@ void ide_setup_ports ( hw_regs_t *hw, | |||
675 | */ | 675 | */ |
676 | } | 676 | } |
677 | 677 | ||
678 | void ide_init_port_hw(ide_hwif_t *hwif, hw_regs_t *hw) | ||
679 | { | ||
680 | memcpy(hwif->io_ports, hw->io_ports, sizeof(hwif->io_ports)); | ||
681 | hwif->irq = hw->irq; | ||
682 | hwif->noprobe = 0; | ||
683 | hwif->chipset = hw->chipset; | ||
684 | hwif->gendev.parent = hw->dev; | ||
685 | hwif->ack_intr = hw->ack_intr; | ||
686 | } | ||
687 | EXPORT_SYMBOL_GPL(ide_init_port_hw); | ||
688 | |||
678 | /** | 689 | /** |
679 | * ide_register_hw - register IDE interface | 690 | * ide_register_hw - register IDE interface |
680 | * @hw: hardware registers | 691 | * @hw: hardware registers |
@@ -729,13 +740,9 @@ found: | |||
729 | } | 740 | } |
730 | if (hwif->present) | 741 | if (hwif->present) |
731 | return -1; | 742 | return -1; |
732 | memcpy(hwif->io_ports, hw->io_ports, sizeof(hwif->io_ports)); | 743 | |
733 | hwif->irq = hw->irq; | 744 | ide_init_port_hw(hwif, hw); |
734 | hwif->noprobe = 0; | ||
735 | hwif->quirkproc = quirkproc; | 745 | hwif->quirkproc = quirkproc; |
736 | hwif->chipset = hw->chipset; | ||
737 | hwif->gendev.parent = hw->dev; | ||
738 | hwif->ack_intr = hw->ack_intr; | ||
739 | 746 | ||
740 | if (initializing == 0) { | 747 | if (initializing == 0) { |
741 | u8 idx[4] = { index, 0xff, 0xff, 0xff }; | 748 | u8 idx[4] = { index, 0xff, 0xff, 0xff }; |