diff options
Diffstat (limited to 'drivers/ide/pci/cmd640.c')
-rw-r--r-- | drivers/ide/pci/cmd640.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/ide/pci/cmd640.c b/drivers/ide/pci/cmd640.c index 1ad1e23e3105..ccde1e444e13 100644 --- a/drivers/ide/pci/cmd640.c +++ b/drivers/ide/pci/cmd640.c | |||
@@ -717,8 +717,8 @@ static int __init cmd640x_init(void) | |||
717 | int second_port_cmd640 = 0, rc; | 717 | int second_port_cmd640 = 0, rc; |
718 | const char *bus_type, *port2; | 718 | const char *bus_type, *port2; |
719 | u8 b, cfr; | 719 | u8 b, cfr; |
720 | hw_regs_t hw[2], *hws[] = { NULL, NULL, NULL, NULL }; | ||
720 | u8 idx[4] = { 0xff, 0xff, 0xff, 0xff }; | 721 | u8 idx[4] = { 0xff, 0xff, 0xff, 0xff }; |
721 | hw_regs_t hw[2]; | ||
722 | 722 | ||
723 | if (cmd640_vlb && probe_for_cmd640_vlb()) { | 723 | if (cmd640_vlb && probe_for_cmd640_vlb()) { |
724 | bus_type = "VLB"; | 724 | bus_type = "VLB"; |
@@ -787,7 +787,9 @@ static int __init cmd640x_init(void) | |||
787 | * Initialize data for primary port | 787 | * Initialize data for primary port |
788 | */ | 788 | */ |
789 | if (cmd_hwif0) { | 789 | if (cmd_hwif0) { |
790 | ide_init_port_hw(cmd_hwif0, &hw[0]); | 790 | cmd_hwif0->chipset = ide_cmd640; |
791 | |||
792 | hws[0] = &hw[0]; | ||
791 | idx[0] = cmd_hwif0->index; | 793 | idx[0] = cmd_hwif0->index; |
792 | } | 794 | } |
793 | 795 | ||
@@ -832,7 +834,7 @@ static int __init cmd640x_init(void) | |||
832 | if (second_port_cmd640) { | 834 | if (second_port_cmd640) { |
833 | cmd_hwif1 = ide_find_port(); | 835 | cmd_hwif1 = ide_find_port(); |
834 | if (cmd_hwif1) { | 836 | if (cmd_hwif1) { |
835 | ide_init_port_hw(cmd_hwif1, &hw[1]); | 837 | hws[1] = &hw[1]; |
836 | idx[1] = cmd_hwif1->index; | 838 | idx[1] = cmd_hwif1->index; |
837 | } | 839 | } |
838 | } | 840 | } |
@@ -843,7 +845,7 @@ static int __init cmd640x_init(void) | |||
843 | cmd640_dump_regs(); | 845 | cmd640_dump_regs(); |
844 | #endif | 846 | #endif |
845 | 847 | ||
846 | ide_device_add(idx, &cmd640_port_info); | 848 | ide_device_add(idx, &cmd640_port_info, hws); |
847 | 849 | ||
848 | return 1; | 850 | return 1; |
849 | } | 851 | } |