diff options
author | Akinobu Mita <akinobu.mita@gmail.com> | 2012-10-27 11:49:31 -0400 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2013-01-08 01:04:54 -0500 |
commit | 91998261dd0d5aefb56d87cef84f7810c32f6194 (patch) | |
tree | cde4ac255948455dfa756007bf29dde89ae10d83 | |
parent | e5a087fdc1ebe5bba40bcecb53c28a0af70e3b47 (diff) |
dma: amba-pl08x: use vchan_dma_desc_free_list
vchan_dma_desc_free_list() iterates through each virt_dma_desc in the
specified list_head and calls vchan->desc_free().
We can use it instead of repeated execution of pl08x_desc_free() for each
virt_dma_desc in the list_head. Because vchan->desc_free callback is set
as pl08x_desc_free() for amba-pl08x driver.
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Vinod Koul <vinod.koul@intel.com>
Cc: Dan Williams <djbw@fb.com>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
-rw-r--r-- | drivers/dma/amba-pl08x.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/dma/amba-pl08x.c b/drivers/dma/amba-pl08x.c index d1cc5791476b..6eb6a5c210bb 100644 --- a/drivers/dma/amba-pl08x.c +++ b/drivers/dma/amba-pl08x.c | |||
@@ -1096,15 +1096,9 @@ static void pl08x_free_txd_list(struct pl08x_driver_data *pl08x, | |||
1096 | struct pl08x_dma_chan *plchan) | 1096 | struct pl08x_dma_chan *plchan) |
1097 | { | 1097 | { |
1098 | LIST_HEAD(head); | 1098 | LIST_HEAD(head); |
1099 | struct pl08x_txd *txd; | ||
1100 | 1099 | ||
1101 | vchan_get_all_descriptors(&plchan->vc, &head); | 1100 | vchan_get_all_descriptors(&plchan->vc, &head); |
1102 | 1101 | vchan_dma_desc_free_list(&plchan->vc, &head); | |
1103 | while (!list_empty(&head)) { | ||
1104 | txd = list_first_entry(&head, struct pl08x_txd, vd.node); | ||
1105 | list_del(&txd->vd.node); | ||
1106 | pl08x_desc_free(&txd->vd); | ||
1107 | } | ||
1108 | } | 1102 | } |
1109 | 1103 | ||
1110 | /* | 1104 | /* |