Skip to content

Commit

Permalink
pmac: remove needless pmac_ide_destroy_dmatable() wrapper
Browse files Browse the repository at this point in the history
hwif->sg_nents is always != 0 when this function is called
and there is also no need to explicitely zero hwif->sg_nents.

Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
  • Loading branch information
Bartlomiej Zolnierkiewicz committed Oct 13, 2008
1 parent 9055ba3 commit f5e0b5e
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions drivers/ide/ppc/pmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -1523,18 +1523,6 @@ pmac_ide_build_dmatable(ide_drive_t *drive, struct request *rq)
return 0; /* revert to PIO for this request */
}

/* Teardown mappings after DMA has completed. */
static void
pmac_ide_destroy_dmatable (ide_drive_t *drive)
{
ide_hwif_t *hwif = drive->hwif;

if (hwif->sg_nents) {
ide_destroy_dmatable(drive);
hwif->sg_nents = 0;
}
}

/*
* Prepare a DMA transfer. We build the DMA table, adjust the timings for
* a read on KeyLargo ATA/66 and mark us as waiting for DMA completion
Expand Down Expand Up @@ -1606,7 +1594,9 @@ pmac_ide_dma_end (ide_drive_t *drive)
drive->waiting_for_dma = 0;
dstat = readl(&dma->status);
writel(((RUN|WAKE|DEAD) << 16), &dma->control);
pmac_ide_destroy_dmatable(drive);

ide_destroy_dmatable(drive);

/* verify good dma status. we don't check for ACTIVE beeing 0. We should...
* in theory, but with ATAPI decices doing buffer underruns, that would
* cause us to disable DMA, which isn't what we want
Expand Down

0 comments on commit f5e0b5e

Please sign in to comment.