aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-proc.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-proc.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-proc.c')
-rw-r--r--drivers/ide/ide-proc.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/ide/ide-proc.c b/drivers/ide/ide-proc.c
index 1dc827fa7061..1d8978b3314a 100644
--- a/drivers/ide/ide-proc.c
+++ b/drivers/ide/ide-proc.c
@@ -593,14 +593,13 @@ EXPORT_SYMBOL(ide_proc_unregister_driver);
593 593
594void ide_proc_port_register_devices(ide_hwif_t *hwif) 594void ide_proc_port_register_devices(ide_hwif_t *hwif)
595{ 595{
596 int d;
597 struct proc_dir_entry *ent; 596 struct proc_dir_entry *ent;
598 struct proc_dir_entry *parent = hwif->proc; 597 struct proc_dir_entry *parent = hwif->proc;
598 ide_drive_t *drive;
599 char name[64]; 599 char name[64];
600 int i;
600 601
601 for (d = 0; d < MAX_DRIVES; d++) { 602 ide_port_for_each_dev(i, drive, hwif) {
602 ide_drive_t *drive = hwif->devices[d];
603
604 if ((drive->dev_flags & IDE_DFLAG_PRESENT) == 0 || drive->proc) 603 if ((drive->dev_flags & IDE_DFLAG_PRESENT) == 0 || drive->proc)
605 continue; 604 continue;
606 605