diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-03-31 14:15:21 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2009-03-31 14:15:21 -0400 |
commit | 11998b316173f814698f9037ce9179d634d1f423 (patch) | |
tree | 468bc633384c3bb4cd32754fd853c07fcd54afbc /drivers/ide/trm290.c | |
parent | 8a4a5738ba499083cf4c5668895efe220b1946d3 (diff) |
ide: move ide_map_sg() call out of ->dma_setup method (take 2)
Move ide_map_sg() call from ->dma_setup implementations and
ide_destroy_dmatable() one from *_build_dmatable() to ide_dma_prepare().
There should be no functional changes caused by this patch.
Sergei:
Removed 'use_pio_instead' labels and replaced 'goto' with 'return 0' --
that required no changes to the follow-up patches...
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/trm290.c')
-rw-r--r-- | drivers/ide/trm290.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/ide/trm290.c b/drivers/ide/trm290.c index 1076efd050dc..0be27cae27d5 100644 --- a/drivers/ide/trm290.c +++ b/drivers/ide/trm290.c | |||
@@ -193,11 +193,10 @@ static int trm290_dma_setup(ide_drive_t *drive, struct ide_cmd *cmd) | |||
193 | unsigned int count, rw = (cmd->tf_flags & IDE_TFLAG_WRITE) ? 1 : 2; | 193 | unsigned int count, rw = (cmd->tf_flags & IDE_TFLAG_WRITE) ? 1 : 2; |
194 | 194 | ||
195 | count = ide_build_dmatable(drive, cmd); | 195 | count = ide_build_dmatable(drive, cmd); |
196 | if (count == 0) { | 196 | if (count == 0) |
197 | ide_map_sg(drive, cmd); | ||
198 | /* try PIO instead of DMA */ | 197 | /* try PIO instead of DMA */ |
199 | return 1; | 198 | return 1; |
200 | } | 199 | |
201 | outl(hwif->dmatable_dma | rw, hwif->dma_base); | 200 | outl(hwif->dmatable_dma | rw, hwif->dma_base); |
202 | drive->waiting_for_dma = 1; | 201 | drive->waiting_for_dma = 1; |
203 | /* start DMA */ | 202 | /* start DMA */ |