aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/legacy/q40ide.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/legacy/q40ide.c')
-rw-r--r--drivers/ide/legacy/q40ide.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/ide/legacy/q40ide.c b/drivers/ide/legacy/q40ide.c
index 9c2b9d078f69..fcb04b8b0238 100644
--- a/drivers/ide/legacy/q40ide.c
+++ b/drivers/ide/legacy/q40ide.c
@@ -112,7 +112,7 @@ static int __init q40ide_init(void)
112{ 112{
113 int i; 113 int i;
114 ide_hwif_t *hwif; 114 ide_hwif_t *hwif;
115 const char *name; 115 hw_regs_t hw[Q40IDE_NUM_HWIFS], *hws[] = { NULL, NULL, NULL, NULL };
116 u8 idx[4] = { 0xff, 0xff, 0xff, 0xff }; 116 u8 idx[4] = { 0xff, 0xff, 0xff, 0xff };
117 117
118 if (!MACH_IS_Q40) 118 if (!MACH_IS_Q40)
@@ -121,9 +121,8 @@ static int __init q40ide_init(void)
121 printk(KERN_INFO "ide: Q40 IDE controller\n"); 121 printk(KERN_INFO "ide: Q40 IDE controller\n");
122 122
123 for (i = 0; i < Q40IDE_NUM_HWIFS; i++) { 123 for (i = 0; i < Q40IDE_NUM_HWIFS; i++) {
124 hw_regs_t hw; 124 const char *name = q40_ide_names[i];
125 125
126 name = q40_ide_names[i];
127 if (!request_region(pcide_bases[i], 8, name)) { 126 if (!request_region(pcide_bases[i], 8, name)) {
128 printk("could not reserve ports %lx-%lx for %s\n", 127 printk("could not reserve ports %lx-%lx for %s\n",
129 pcide_bases[i],pcide_bases[i]+8,name); 128 pcide_bases[i],pcide_bases[i]+8,name);
@@ -135,24 +134,23 @@ static int __init q40ide_init(void)
135 release_region(pcide_bases[i], 8); 134 release_region(pcide_bases[i], 8);
136 continue; 135 continue;
137 } 136 }
138 q40_ide_setup_ports(&hw, pcide_bases[i], 137 q40_ide_setup_ports(&hw[i], pcide_bases[i], NULL,
139 NULL,
140// m68kide_iops,
141 q40ide_default_irq(pcide_bases[i])); 138 q40ide_default_irq(pcide_bases[i]));
142 139
143 hwif = ide_find_port(); 140 hwif = ide_find_port();
144 if (hwif) { 141 if (hwif) {
145 ide_init_port_hw(hwif, &hw); 142 hwif->chipset = ide_generic;
146 143
147 /* Q40 has a byte-swapped IDE interface */ 144 /* Q40 has a byte-swapped IDE interface */
148 hwif->input_data = q40ide_input_data; 145 hwif->input_data = q40ide_input_data;
149 hwif->output_data = q40ide_output_data; 146 hwif->output_data = q40ide_output_data;
150 147
148 hws[i] = &hw[i];
151 idx[i] = hwif->index; 149 idx[i] = hwif->index;
152 } 150 }
153 } 151 }
154 152
155 ide_device_add(idx, NULL); 153 ide_device_add(idx, NULL, hws);
156 154
157 return 0; 155 return 0;
158} 156}