aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-01-06 11:20:56 -0500
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-01-06 11:20:56 -0500
commit2bd24a1cfc99d242c2cff9a6b74ca49fcaac3fb6 (patch)
treed4797f56699e9da367e12b5e1d01b108241424f6 /drivers/ide/ide.c
parent5e7f3a46690f7f6c9f2781c700ab4370874aa0e8 (diff)
ide: add port and host iterators
Add ide_port_for_each_dev() / ide_host_for_each_port() iterators and update IDE code to use them. While at it: - s/unit/i/ variable in ide_port_wait_ready(), ide_probe_port(), ide_port_tune_devices(), ide_port_init_devices_data(), do_reset1(), ide_acpi_set_state() and scc_dma_end() - s/d/i/ variable in ide_proc_port_register_devices() There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide.c')
-rw-r--r--drivers/ide/ide.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c
index 8a6f893d127e..258805da15c3 100644
--- a/drivers/ide/ide.c
+++ b/drivers/ide/ide.c
@@ -488,6 +488,7 @@ MODULE_PARM_DESC(ignore_cable, "ignore cable detection");
488 488
489void ide_port_apply_params(ide_hwif_t *hwif) 489void ide_port_apply_params(ide_hwif_t *hwif)
490{ 490{
491 ide_drive_t *drive;
491 int i; 492 int i;
492 493
493 if (ide_ignore_cable & (1 << hwif->index)) { 494 if (ide_ignore_cable & (1 << hwif->index)) {
@@ -496,8 +497,8 @@ void ide_port_apply_params(ide_hwif_t *hwif)
496 hwif->cbl = ATA_CBL_PATA40_SHORT; 497 hwif->cbl = ATA_CBL_PATA40_SHORT;
497 } 498 }
498 499
499 for (i = 0; i < MAX_DRIVES; i++) 500 ide_port_for_each_dev(i, drive, hwif)
500 ide_dev_apply_params(hwif->devices[i], i); 501 ide_dev_apply_params(drive, i);
501} 502}
502 503
503/* 504/*