projects
/
linux-2.6-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
63b870f
)
ARM: SAMSUNG: Use kmemdup rather than duplicating its implementation
author
Thomas Meyer
<thomas@m3y3r.de>
Thu, 8 Dec 2011 01:05:52 +0000
(10:05 +0900)
committer
Kukjin Kim
<kgene.kim@samsung.com>
Thu, 8 Dec 2011 01:05:52 +0000
(10:05 +0900)
The semantic patch that makes this change is available
in scripts/coccinelle/api/memdup.cocci.
Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
arch/arm/plat-s3c24xx/dma.c
patch
|
blob
|
blame
|
history
diff --git
a/arch/arm/plat-s3c24xx/dma.c
b/arch/arm/plat-s3c24xx/dma.c
index 53754bcf15a758c05b536f5836c2efb6ea2ba57d..9fe35348e03b433d5294cfcd02c1742c268f3391 100644
(file)
--- a/
arch/arm/plat-s3c24xx/dma.c
+++ b/
arch/arm/plat-s3c24xx/dma.c
@@
-1437,11
+1437,10
@@
int __init s3c24xx_dma_init_map(struct s3c24xx_dma_selection *sel)
size_t map_sz = sizeof(*nmap) * sel->map_size;
int ptr;
- nmap = km
alloc(
map_sz, GFP_KERNEL);
+ nmap = km
emdup(sel->map,
map_sz, GFP_KERNEL);
if (nmap == NULL)
return -ENOMEM;
- memcpy(nmap, sel->map, map_sz);
memcpy(&dma_sel, sel, sizeof(*sel));
dma_sel.map = nmap;