Commit a6dd30e2 authored by Nicolin Chen's avatar Nicolin Chen Committed by Linus Torvalds

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: default avatarNicolin 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: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 66f11969
...@@ -350,12 +350,7 @@ struct mmp_tdma_desc *mmp_tdma_alloc_descriptor(struct mmp_tdma_chan *tdmac) ...@@ -350,12 +350,7 @@ struct mmp_tdma_desc *mmp_tdma_alloc_descriptor(struct mmp_tdma_chan *tdmac)
if (!gpool) if (!gpool)
return NULL; return NULL;
tdmac->desc_arr = (void *)gen_pool_alloc(gpool, size); tdmac->desc_arr = gen_pool_dma_alloc(gpool, size, &tdmac->desc_arr_phys);
if (!tdmac->desc_arr)
return NULL;
tdmac->desc_arr_phys = gen_pool_virt_to_phys(gpool,
(unsigned long)tdmac->desc_arr);
return tdmac->desc_arr; return tdmac->desc_arr;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment