aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/ide/ide-probe.c6
-rw-r--r--drivers/ide/legacy/ht6560b.c8
-rw-r--r--drivers/ide/legacy/ide-4drives.c10
-rw-r--r--drivers/ide/legacy/qd65xx.c16
4 files changed, 19 insertions, 21 deletions
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c
index 97dda05914a1..c5dc18849303 100644
--- a/drivers/ide/ide-probe.c
+++ b/drivers/ide/ide-probe.c
@@ -1320,10 +1320,10 @@ static void ide_port_init_devices(ide_hwif_t *hwif)
1320 drive->unmask = 1; 1320 drive->unmask = 1;
1321 if (hwif->host_flags & IDE_HFLAG_NO_UNMASK_IRQS) 1321 if (hwif->host_flags & IDE_HFLAG_NO_UNMASK_IRQS)
1322 drive->no_unmask = 1; 1322 drive->no_unmask = 1;
1323 }
1324 1323
1325 if (port_ops && port_ops->port_init_devs) 1324 if (port_ops && port_ops->init_dev)
1326 port_ops->port_init_devs(hwif); 1325 port_ops->init_dev(drive);
1326 }
1327} 1327}
1328 1328
1329static void ide_init_port(ide_hwif_t *hwif, unsigned int port, 1329static void ide_init_port(ide_hwif_t *hwif, unsigned int port,
diff --git a/drivers/ide/legacy/ht6560b.c b/drivers/ide/legacy/ht6560b.c
index bd2f579946fa..7bc8fd59ea9e 100644
--- a/drivers/ide/legacy/ht6560b.c
+++ b/drivers/ide/legacy/ht6560b.c
@@ -310,16 +310,16 @@ static void ht6560b_set_pio_mode(ide_drive_t *drive, const u8 pio)
310#endif 310#endif
311} 311}
312 312
313static void __init ht6560b_port_init_devs(ide_hwif_t *hwif) 313static void __init ht6560b_init_dev(ide_drive_t *drive)
314{ 314{
315 ide_hwif_t *hwif = drive->hwif;
315 /* Setting default configurations for drives. */ 316 /* Setting default configurations for drives. */
316 int t = (HT_CONFIG_DEFAULT << 8) | HT_TIMING_DEFAULT; 317 int t = (HT_CONFIG_DEFAULT << 8) | HT_TIMING_DEFAULT;
317 318
318 if (hwif->channel) 319 if (hwif->channel)
319 t |= (HT_SECONDARY_IF << 8); 320 t |= (HT_SECONDARY_IF << 8);
320 321
321 hwif->drives[0].drive_data = t; 322 drive->drive_data = t;
322 hwif->drives[1].drive_data = t;
323} 323}
324 324
325static int probe_ht6560b; 325static int probe_ht6560b;
@@ -328,7 +328,7 @@ module_param_named(probe, probe_ht6560b, bool, 0);
328MODULE_PARM_DESC(probe, "probe for HT6560B chipset"); 328MODULE_PARM_DESC(probe, "probe for HT6560B chipset");
329 329
330static const struct ide_port_ops ht6560b_port_ops = { 330static const struct ide_port_ops ht6560b_port_ops = {
331 .port_init_devs = ht6560b_port_init_devs, 331 .init_dev = ht6560b_init_dev,
332 .set_pio_mode = ht6560b_set_pio_mode, 332 .set_pio_mode = ht6560b_set_pio_mode,
333 .selectproc = ht6560b_selectproc, 333 .selectproc = ht6560b_selectproc,
334}; 334};
diff --git a/drivers/ide/legacy/ide-4drives.c b/drivers/ide/legacy/ide-4drives.c
index 5cd6ce537eea..89c8ff0a4d08 100644
--- a/drivers/ide/legacy/ide-4drives.c
+++ b/drivers/ide/legacy/ide-4drives.c
@@ -11,16 +11,14 @@ static int probe_4drives;
11module_param_named(probe, probe_4drives, bool, 0); 11module_param_named(probe, probe_4drives, bool, 0);
12MODULE_PARM_DESC(probe, "probe for generic IDE chipset with 4 drives/port"); 12MODULE_PARM_DESC(probe, "probe for generic IDE chipset with 4 drives/port");
13 13
14static void ide_4drives_port_init_devs(ide_hwif_t *hwif) 14static void ide_4drives_init_dev(ide_drive_t *drive)
15{ 15{
16 if (hwif->channel) { 16 if (drive->hwif->channel)
17 hwif->drives[0].select.all ^= 0x20; 17 drive->select.all ^= 0x20;
18 hwif->drives[1].select.all ^= 0x20;
19 }
20} 18}
21 19
22static const struct ide_port_ops ide_4drives_port_ops = { 20static const struct ide_port_ops ide_4drives_port_ops = {
23 .port_init_devs = ide_4drives_port_init_devs, 21 .init_dev = ide_4drives_init_dev,
24}; 22};
25 23
26static const struct ide_port_info ide_4drives_port_info = { 24static const struct ide_port_info ide_4drives_port_info = {
diff --git a/drivers/ide/legacy/qd65xx.c b/drivers/ide/legacy/qd65xx.c
index 63f6c31d16ea..2338f344ea24 100644
--- a/drivers/ide/legacy/qd65xx.c
+++ b/drivers/ide/legacy/qd65xx.c
@@ -282,17 +282,18 @@ static int __init qd_testreg(int port)
282 return (readreg != QD_TESTVAL); 282 return (readreg != QD_TESTVAL);
283} 283}
284 284
285static void __init qd6500_port_init_devs(ide_hwif_t *hwif) 285static void __init qd6500_init_dev(ide_drive_t *drive)
286{ 286{
287 ide_hwif_t *hwif = drive->hwif;
287 u8 base = (hwif->config_data & 0xff00) >> 8; 288 u8 base = (hwif->config_data & 0xff00) >> 8;
288 u8 config = QD_CONFIG(hwif); 289 u8 config = QD_CONFIG(hwif);
289 290
290 hwif->drives[0].drive_data = QD6500_DEF_DATA; 291 drive->drive_data = QD6500_DEF_DATA;
291 hwif->drives[1].drive_data = QD6500_DEF_DATA;
292} 292}
293 293
294static void __init qd6580_port_init_devs(ide_hwif_t *hwif) 294static void __init qd6580_init_dev(ide_drive_t *drive)
295{ 295{
296 ide_hwif_t *hwif = drive->hwif;
296 u16 t1, t2; 297 u16 t1, t2;
297 u8 base = (hwif->config_data & 0xff00) >> 8; 298 u8 base = (hwif->config_data & 0xff00) >> 8;
298 u8 config = QD_CONFIG(hwif); 299 u8 config = QD_CONFIG(hwif);
@@ -303,18 +304,17 @@ static void __init qd6580_port_init_devs(ide_hwif_t *hwif)
303 } else 304 } else
304 t2 = t1 = hwif->channel ? QD6580_DEF_DATA2 : QD6580_DEF_DATA; 305 t2 = t1 = hwif->channel ? QD6580_DEF_DATA2 : QD6580_DEF_DATA;
305 306
306 hwif->drives[0].drive_data = t1; 307 drive->drive_data = drive->select.b.unit ? t2 : t1;
307 hwif->drives[1].drive_data = t2;
308} 308}
309 309
310static const struct ide_port_ops qd6500_port_ops = { 310static const struct ide_port_ops qd6500_port_ops = {
311 .port_init_devs = qd6500_port_init_devs, 311 .init_dev = qd6500_init_dev,
312 .set_pio_mode = qd6500_set_pio_mode, 312 .set_pio_mode = qd6500_set_pio_mode,
313 .selectproc = qd65xx_select, 313 .selectproc = qd65xx_select,
314}; 314};
315 315
316static const struct ide_port_ops qd6580_port_ops = { 316static const struct ide_port_ops qd6580_port_ops = {
317 .port_init_devs = qd6580_port_init_devs, 317 .init_dev = qd6580_init_dev,
318 .set_pio_mode = qd6580_set_pio_mode, 318 .set_pio_mode = qd6580_set_pio_mode,
319 .selectproc = qd65xx_select, 319 .selectproc = qd65xx_select,
320}; 320};