diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-10-13 15:39:45 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-10-13 15:39:45 -0400 |
commit | f5e0b5ecb3afc8050259003067b6a1aef3635f12 (patch) | |
tree | 844d99a5478061268c383e2fcf1b952c96b07ed2 | |
parent | 9055ba3ee2dba801e8e6bddec9003ad8bca153ab (diff) |
pmac: remove needless pmac_ide_destroy_dmatable() wrapper
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>
-rw-r--r-- | drivers/ide/ppc/pmac.c | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/drivers/ide/ppc/pmac.c b/drivers/ide/ppc/pmac.c index 7f2ce6195d1e..2e19d6298536 100644 --- a/drivers/ide/ppc/pmac.c +++ b/drivers/ide/ppc/pmac.c | |||
@@ -1523,18 +1523,6 @@ use_pio_instead: | |||
1523 | return 0; /* revert to PIO for this request */ | 1523 | return 0; /* revert to PIO for this request */ |
1524 | } | 1524 | } |
1525 | 1525 | ||
1526 | /* Teardown mappings after DMA has completed. */ | ||
1527 | static void | ||
1528 | pmac_ide_destroy_dmatable (ide_drive_t *drive) | ||
1529 | { | ||
1530 | ide_hwif_t *hwif = drive->hwif; | ||
1531 | |||
1532 | if (hwif->sg_nents) { | ||
1533 | ide_destroy_dmatable(drive); | ||
1534 | hwif->sg_nents = 0; | ||
1535 | } | ||
1536 | } | ||
1537 | |||
1538 | /* | 1526 | /* |
1539 | * Prepare a DMA transfer. We build the DMA table, adjust the timings for | 1527 | * Prepare a DMA transfer. We build the DMA table, adjust the timings for |
1540 | * a read on KeyLargo ATA/66 and mark us as waiting for DMA completion | 1528 | * a read on KeyLargo ATA/66 and mark us as waiting for DMA completion |
@@ -1606,7 +1594,9 @@ pmac_ide_dma_end (ide_drive_t *drive) | |||
1606 | drive->waiting_for_dma = 0; | 1594 | drive->waiting_for_dma = 0; |
1607 | dstat = readl(&dma->status); | 1595 | dstat = readl(&dma->status); |
1608 | writel(((RUN|WAKE|DEAD) << 16), &dma->control); | 1596 | writel(((RUN|WAKE|DEAD) << 16), &dma->control); |
1609 | pmac_ide_destroy_dmatable(drive); | 1597 | |
1598 | ide_destroy_dmatable(drive); | ||
1599 | |||
1610 | /* verify good dma status. we don't check for ACTIVE beeing 0. We should... | 1600 | /* verify good dma status. we don't check for ACTIVE beeing 0. We should... |
1611 | * in theory, but with ATAPI decices doing buffer underruns, that would | 1601 | * in theory, but with ATAPI decices doing buffer underruns, that would |
1612 | * cause us to disable DMA, which isn't what we want | 1602 | * cause us to disable DMA, which isn't what we want |