Re: [PATCH][RESEND 3/8] dma: mmp_tdma: use gen_pool_dma_alloc() to allocate descriptor

2013-11-11 Thread Vinod Koul
On Fri, Nov 01, 2013 at 07:48:16PM +0800, Nicolin Chen wrote:
 Since gen_pool_dma_alloc() is introduced, we implement it to simplify code.

Acked-by: Vinod Koul vinod.k...@intel.com

--
~Vinod
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH][RESEND 3/8] dma: mmp_tdma: use gen_pool_dma_alloc() to allocate descriptor

2013-11-01 Thread Nicolin Chen
Since gen_pool_dma_alloc() is introduced, we implement it to simplify code.

Signed-off-by: Nicolin Chen b42...@freescale.com
---
 drivers/dma/mmp_tdma.c | 7 +--
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/dma/mmp_tdma.c b/drivers/dma/mmp_tdma.c
index 2b4026d..3ddacc1 100644
--- a/drivers/dma/mmp_tdma.c
+++ b/drivers/dma/mmp_tdma.c
@@ -378,12 +378,7 @@ struct mmp_tdma_desc *mmp_tdma_alloc_descriptor(struct 
mmp_tdma_chan *tdmac)
if (!gpool)
return NULL;
 
-   tdmac-desc_arr = (void *)gen_pool_alloc(gpool, size);
-   if (!tdmac-desc_arr)
-   return NULL;
-
-   tdmac-desc_arr_phys = gen_pool_virt_to_phys(gpool,
-   (unsigned long)tdmac-desc_arr);
+   tdmac-desc_arr = gen_pool_dma_alloc(gpool, size, 
tdmac-desc_arr_phys);
 
return tdmac-desc_arr;
 }
-- 
1.8.4


--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html