summaryrefslogtreecommitdiffstats
path: root/drivers/dma
diff options
context:
space:
mode:
authorTomoya MORINAGA <tomoya-linux@dsn.lapis-semi.com>2011-10-12 02:38:35 +0200
committerVinod Koul <vinod.koul@linux.intel.com>2011-10-12 07:21:24 +0200
commit01631243d712d41681d61c0556341a3329860c47 (patch)
treefcaa0e40b761b5cdd0dee64c658c6c69fa53ebc6 /drivers/dma
parentpch_dma: Fix suspend issue (diff)
downloadlinux-01631243d712d41681d61c0556341a3329860c47.tar.xz
linux-01631243d712d41681d61c0556341a3329860c47.zip
pch_dma: Reduce wasting memory
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>
Diffstat (limited to 'drivers/dma')
-rw-r--r--drivers/dma/pch_dma.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/dma/pch_dma.c b/drivers/dma/pch_dma.c
index 6abe5ac3bd5e..a6d0e3dbed07 100644
--- 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;