aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-dma.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-03-31 14:15:21 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-03-31 14:15:21 -0400
commit11998b316173f814698f9037ce9179d634d1f423 (patch)
tree468bc633384c3bb4cd32754fd853c07fcd54afbc /drivers/ide/ide-dma.c
parent8a4a5738ba499083cf4c5668895efe220b1946d3 (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/ide-dma.c')
-rw-r--r--drivers/ide/ide-dma.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/ide/ide-dma.c b/drivers/ide/ide-dma.c
index c0505e2dfc2e..d61f9a8cc18a 100644
--- a/drivers/ide/ide-dma.c
+++ b/drivers/ide/ide-dma.c
@@ -570,8 +570,12 @@ int ide_dma_prepare(ide_drive_t *drive, struct ide_cmd *cmd)
570 570
571 if ((drive->dev_flags & IDE_DFLAG_USING_DMA) == 0 || 571 if ((drive->dev_flags & IDE_DFLAG_USING_DMA) == 0 ||
572 (dma_ops->dma_check && dma_ops->dma_check(drive, cmd)) || 572 (dma_ops->dma_check && dma_ops->dma_check(drive, cmd)) ||
573 ide_build_sglist(drive, cmd) == 0 || 573 ide_build_sglist(drive, cmd) == 0)
574 dma_ops->dma_setup(drive, cmd))
575 return 1; 574 return 1;
575 if (dma_ops->dma_setup(drive, cmd)) {
576 ide_destroy_dmatable(drive);
577 ide_map_sg(drive, cmd);
578 return 1;
579 }
576 return 0; 580 return 0;
577} 581}