diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-01-06 11:20:56 -0500 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-01-06 11:20:56 -0500 |
commit | 2bd24a1cfc99d242c2cff9a6b74ca49fcaac3fb6 (patch) | |
tree | d4797f56699e9da367e12b5e1d01b108241424f6 /drivers/ide/scc_pata.c | |
parent | 5e7f3a46690f7f6c9f2781c700ab4370874aa0e8 (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/scc_pata.c')
-rw-r--r-- | drivers/ide/scc_pata.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/ide/scc_pata.c b/drivers/ide/scc_pata.c index 841164d7d3b9..5d53850c79d7 100644 --- a/drivers/ide/scc_pata.c +++ b/drivers/ide/scc_pata.c | |||
@@ -406,17 +406,17 @@ static int scc_dma_end(ide_drive_t *drive) | |||
406 | data_loss = 1; | 406 | data_loss = 1; |
407 | if (retry++) { | 407 | if (retry++) { |
408 | struct request *rq = hwif->rq; | 408 | struct request *rq = hwif->rq; |
409 | int unit; | 409 | ide_drive_t *drive; |
410 | int i; | ||
411 | |||
410 | /* ERROR_RESET and drive->crc_count are needed | 412 | /* ERROR_RESET and drive->crc_count are needed |
411 | * to reduce DMA transfer mode in retry process. | 413 | * to reduce DMA transfer mode in retry process. |
412 | */ | 414 | */ |
413 | if (rq) | 415 | if (rq) |
414 | rq->errors |= ERROR_RESET; | 416 | rq->errors |= ERROR_RESET; |
415 | for (unit = 0; unit < MAX_DRIVES; unit++) { | ||
416 | ide_drive_t *drive = hwif->devices[unit]; | ||
417 | 417 | ||
418 | ide_port_for_each_dev(i, drive, hwif) | ||
418 | drive->crc_count++; | 419 | drive->crc_count++; |
419 | } | ||
420 | } | 420 | } |
421 | } | 421 | } |
422 | } | 422 | } |