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:
c43f150
)
pch_dma: Reduce wasting memory
author
Tomoya MORINAGA
<tomoya-linux@dsn.lapis-semi.com>
Wed, 12 Oct 2011 00:38:35 +0000
(09:38 +0900)
committer
Vinod Koul
<vinod.koul@linux.intel.com>
Wed, 12 Oct 2011 05:21:24 +0000
(10:51 +0530)
nr_channels is defined in "struct pch_dma".
and struct pch_dma_chan is defined in "struct pch_dma".
So, "sizeof(struct pch_dma_chan) * nr_channels" is unnecessary.
Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.lapis-semi.com>
Signed-off-by: Vinod Koul <vinod.koul@linux.intel.com>
drivers/dma/pch_dma.c
patch
|
blob
|
history
diff --git
a/drivers/dma/pch_dma.c
b/drivers/dma/pch_dma.c
index 6abe5ac3bd5e110f83bc1900ec33201161db12dc..a6d0e3dbed0748f1d666f5972b4109dfb043a3e2 100644
(file)
--- a/
drivers/dma/pch_dma.c
+++ b/
drivers/dma/pch_dma.c
@@
-872,8
+872,7
@@
static int __devinit pch_dma_probe(struct pci_dev *pdev,
int i;
nr_channels = id->driver_data;
- pd = kzalloc(sizeof(struct pch_dma)+
- sizeof(struct pch_dma_chan) * nr_channels, GFP_KERNEL);
+ pd = kzalloc(sizeof(*pd), GFP_KERNEL);
if (!pd)
return -ENOMEM;