aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-atapi.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-03-31 14:15:24 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2009-03-31 14:15:24 -0400
commitf094d4d83bccee9277ddb6aadccf35747889426b (patch)
treea4cd886f42d6ab13b507c23b08f2064ceba04623 /drivers/ide/ide-atapi.c
parent88b4132e101e60e8fa67996ae3072ab6b71e8500 (diff)
ide: sanitize ide_build_sglist() and ide_destroy_dmatable()
* Move ide_map_sg() calls out from ide_build_sglist() to ide_dma_prepare(). * Pass command to ide_destroy_dmatable(). * Rename ide_build_sglist() to ide_dma_map_sg() and ide_destroy_dmatable() to ide_dma_unmap_sg(). There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-atapi.c')
-rw-r--r--drivers/ide/ide-atapi.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/ide/ide-atapi.c b/drivers/ide/ide-atapi.c
index db6e617790bd..3f3fc7c7b2fe 100644
--- a/drivers/ide/ide-atapi.c
+++ b/drivers/ide/ide-atapi.c
@@ -326,6 +326,7 @@ static ide_startstop_t ide_pc_intr(ide_drive_t *drive)
326{ 326{
327 struct ide_atapi_pc *pc = drive->pc; 327 struct ide_atapi_pc *pc = drive->pc;
328 ide_hwif_t *hwif = drive->hwif; 328 ide_hwif_t *hwif = drive->hwif;
329 struct ide_cmd *cmd = &hwif->cmd;
329 struct request *rq = hwif->rq; 330 struct request *rq = hwif->rq;
330 const struct ide_tp_ops *tp_ops = hwif->tp_ops; 331 const struct ide_tp_ops *tp_ops = hwif->tp_ops;
331 xfer_func_t *xferfunc; 332 xfer_func_t *xferfunc;
@@ -346,7 +347,7 @@ static ide_startstop_t ide_pc_intr(ide_drive_t *drive)
346 347
347 drive->waiting_for_dma = 0; 348 drive->waiting_for_dma = 0;
348 rc = hwif->dma_ops->dma_end(drive); 349 rc = hwif->dma_ops->dma_end(drive);
349 ide_destroy_dmatable(drive); 350 ide_dma_unmap_sg(drive, cmd);
350 351
351 if (rc || (drive->media == ide_tape && (stat & ATA_ERR))) { 352 if (rc || (drive->media == ide_tape && (stat & ATA_ERR))) {
352 if (drive->media == ide_floppy) 353 if (drive->media == ide_floppy)