projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
66f1196
)
drivers/dma/mmp_tdma.c: use gen_pool_dma_alloc() to allocate descriptor
author
Nicolin Chen
<
[email protected]
>
Tue, 12 Nov 2013 23:09:55 +0000
(15:09 -0800)
committer
Linus Torvalds
<
[email protected]
>
Wed, 13 Nov 2013 03:09:23 +0000
(12:09 +0900)
Since gen_pool_dma_alloc() is introduced, we implement it to simplify code.
Signed-off-by: Nicolin Chen <
[email protected]
>
Cc: Dan Williams <
[email protected]
>
Cc: Vinod Koul <
[email protected]
>
Cc: Grant Likely <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
drivers/dma/mmp_tdma.c
patch
|
blob
|
history
diff --git
a/drivers/dma/mmp_tdma.c
b/drivers/dma/mmp_tdma.c
index 38cb517fb2ebd82034b02e2ab7d5cabfc9992cbd..d3b6358e5a27037281f6da2efb6dad3e926b9fb1 100644
(file)
--- 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)
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;
}