aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma/mmp_tdma.c
diff options
context:
space:
mode:
authorNicolin Chen <b42378@freescale.com>2013-11-12 18:09:55 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2013-11-12 22:09:23 -0500
commita6dd30e2bc88b3816341534c3cd0ebbecdda3ec6 (patch)
treed454ccd397275f878a3f88bf10a5beae1cda562f /drivers/dma/mmp_tdma.c
parent66f119695bcccc2b03b354152f6d65a0b129cef9 (diff)
drivers/dma/mmp_tdma.c: use gen_pool_dma_alloc() to allocate descriptor
Since gen_pool_dma_alloc() is introduced, we implement it to simplify code. Signed-off-by: Nicolin Chen <b42378@freescale.com> Cc: Dan Williams <dan.j.williams@intel.com> Cc: Vinod Koul <vinod.koul@intel.com> Cc: Grant Likely <grant.likely@linaro.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/dma/mmp_tdma.c')
-rw-r--r--drivers/dma/mmp_tdma.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/dma/mmp_tdma.c b/drivers/dma/mmp_tdma.c
index 38cb517fb2eb..d3b6358e5a27 100644
--- a/drivers/dma/mmp_tdma.c
+++ b/drivers/dma/mmp_tdma.c
@@ -350,12 +350,7 @@ struct mmp_tdma_desc *mmp_tdma_alloc_descriptor(struct mmp_tdma_chan *tdmac)
350 if (!gpool) 350 if (!gpool)
351 return NULL; 351 return NULL;
352 352
353 tdmac->desc_arr = (void *)gen_pool_alloc(gpool, size); 353 tdmac->desc_arr = gen_pool_dma_alloc(gpool, size, &tdmac->desc_arr_phys);
354 if (!tdmac->desc_arr)
355 return NULL;
356
357 tdmac->desc_arr_phys = gen_pool_virt_to_phys(gpool,
358 (unsigned long)tdmac->desc_arr);
359 354
360 return tdmac->desc_arr; 355 return tdmac->desc_arr;
361} 356}