diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-03-31 14:15:20 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-03-31 14:15:20 -0400 |
commit | 5ae5412d9a23b05ab08461b202bad21ad8f6b66d (patch) | |
tree | 25d86e7cf0b57e15efa74e5150c2a654fc9339c9 /drivers/ide/ide-taskfile.c | |
parent | 4453011f959a5f5c6c7a33aea54fe17f5e43a867 (diff) |
ide: add ide_dma_prepare() helper
* Add ide_dma_prepare() helper.
* Convert ide_issue_pc() and do_rw_taskfile() to use it.
* Make ide_build_sglist() static.
There should be no functional changes caused by this patch.
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-taskfile.c')
-rw-r--r-- | drivers/ide/ide-taskfile.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/ide/ide-taskfile.c b/drivers/ide/ide-taskfile.c index a3b7a50562b2..dba68db629bf 100644 --- a/drivers/ide/ide-taskfile.c +++ b/drivers/ide/ide-taskfile.c | |||
@@ -100,9 +100,7 @@ ide_startstop_t do_rw_taskfile(ide_drive_t *drive, struct ide_cmd *orig_cmd) | |||
100 | ide_execute_command(drive, cmd, handler, WAIT_WORSTCASE); | 100 | ide_execute_command(drive, cmd, handler, WAIT_WORSTCASE); |
101 | return ide_started; | 101 | return ide_started; |
102 | case ATA_PROT_DMA: | 102 | case ATA_PROT_DMA: |
103 | if ((drive->dev_flags & IDE_DFLAG_USING_DMA) == 0 || | 103 | if (ide_dma_prepare(drive, cmd)) |
104 | ide_build_sglist(drive, cmd) == 0 || | ||
105 | dma_ops->dma_setup(drive, cmd)) | ||
106 | return ide_stopped; | 104 | return ide_stopped; |
107 | hwif->expiry = dma_ops->dma_timer_expiry; | 105 | hwif->expiry = dma_ops->dma_timer_expiry; |
108 | ide_execute_command(drive, cmd, ide_dma_intr, 2 * WAIT_CMD); | 106 | ide_execute_command(drive, cmd, ide_dma_intr, 2 * WAIT_CMD); |