diff options
author | Nicolin Chen <b42378@freescale.com> | 2013-11-12 23:09:56 (GMT) |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-11-13 03:09:23 (GMT) |
commit | 43f950f454815cca2c39244c7441f9288d7389e0 (patch) | |
tree | 77aa79c5671f3bd7b5ca07badbbe98d5c34b2a55 /drivers/media | |
parent | a6dd30e2bc88b3816341534c3cd0ebbecdda3ec6 (diff) | |
download | linux-43f950f454815cca2c39244c7441f9288d7389e0.tar.xz |
drivers/media/platform/coda.c: 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@freescale.com>
Acked-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Cc: Grant Likely <grant.likely@linaro.org>
Cc: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/platform/coda.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/media/platform/coda.c b/drivers/media/platform/coda.c index 449d2fe..4993610 100644 --- a/drivers/media/platform/coda.c +++ b/drivers/media/platform/coda.c @@ -3232,13 +3232,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); |