[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a4cb5380b1eeb1c634cedfe05d2a7dee950742a4.1383303752.git.b42378@freescale.com>
Date: Fri, 1 Nov 2013 19:36:02 +0800
From: Nicolin Chen <b42378@...escale.com>
To: <akpm@...ux-foundation.org>, <joe@...ches.com>, <nsekhar@...com>,
<khilman@...prootsystems.com>, <linux@....linux.org.uk>,
<dan.j.williams@...el.com>, <vinod.koul@...el.com>,
<m.chehab@...sung.com>, <hjk@...sjkoch.de>,
<gregkh@...uxfoundation.org>, <perex@...ex.cz>, <tiwai@...e.de>,
<lgirdwood@...il.com>, <broonie@...nel.org>,
<rmk+kernel@....linux.org.uk>, <eric.y.miao@...il.com>,
<haojian.zhuang@...il.com>
CC: <linux-kernel@...r.kernel.org>,
<davinci-linux-open-source@...ux.davincidsp.com>,
<linux-arm-kernel@...ts.infradead.org>,
<dmaengine@...r.kernel.org>, <linux-media@...r.kernel.org>,
<alsa-devel@...a-project.org>
Subject: [PATCH 4/8] [media] coda: use gen_pool_dma_alloc() to allocate iram buffer
Since gen_pool_dma_alloc() is introduced, we implement it to simplify code.
Signed-off-by: Nicolin Chen <b42378@...escale.com>
---
drivers/media/platform/coda.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/media/platform/coda.c b/drivers/media/platform/coda.c
index ed4998c..bd72fb9 100644
--- a/drivers/media/platform/coda.c
+++ b/drivers/media/platform/coda.c
@@ -3298,13 +3298,12 @@ static int coda_probe(struct platform_device *pdev)
dev->iram_size = CODA7_IRAM_SIZE;
break;
}
- dev->iram_vaddr = gen_pool_alloc(dev->iram_pool, dev->iram_size);
+ dev->iram_vaddr = (unsigned long)gen_pool_dma_alloc(dev->iram_pool,
+ dev->iram_size, (dma_addr_t *)&dev->iram_paddr);
if (!dev->iram_vaddr) {
dev_err(&pdev->dev, "unable to alloc iram\n");
return -ENOMEM;
}
- dev->iram_paddr = gen_pool_virt_to_phys(dev->iram_pool,
- dev->iram_vaddr);
platform_set_drvdata(pdev, dev);
--
1.8.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists