aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2014-06-15 16:37:54 -0400
committerTomi Valkeinen <tomi.valkeinen@ti.com>2014-07-01 06:32:31 -0400
commit0d0b4b4d1deda1bc448c0715d8aeed1542645ff7 (patch)
tree1586efb725012e1f2f30d267762e400fdd3d5f57 /drivers/video
parent350f8ebab1a731913e391929f762315a6173b3bd (diff)
fbdev: da8xx-fb: Use dma_zalloc_coherent
Use the zeroing function instead of dma_alloc_coherent & memset(,0,) Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/fbdev/da8xx-fb.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/video/fbdev/da8xx-fb.c b/drivers/video/fbdev/da8xx-fb.c
index a8484f768d04..788f6b37fce7 100644
--- a/drivers/video/fbdev/da8xx-fb.c
+++ b/drivers/video/fbdev/da8xx-fb.c
@@ -1447,18 +1447,15 @@ static int fb_probe(struct platform_device *device)
1447 da8xx_fb_fix.line_length - 1; 1447 da8xx_fb_fix.line_length - 1;
1448 1448
1449 /* allocate palette buffer */ 1449 /* allocate palette buffer */
1450 par->v_palette_base = dma_alloc_coherent(NULL, 1450 par->v_palette_base = dma_zalloc_coherent(NULL, PALETTE_SIZE,
1451 PALETTE_SIZE, 1451 (resource_size_t *)&par->p_palette_base,
1452 (resource_size_t *) 1452 GFP_KERNEL | GFP_DMA);
1453 &par->p_palette_base,
1454 GFP_KERNEL | GFP_DMA);
1455 if (!par->v_palette_base) { 1453 if (!par->v_palette_base) {
1456 dev_err(&device->dev, 1454 dev_err(&device->dev,
1457 "GLCD: kmalloc for palette buffer failed\n"); 1455 "GLCD: kmalloc for palette buffer failed\n");
1458 ret = -EINVAL; 1456 ret = -EINVAL;
1459 goto err_release_fb_mem; 1457 goto err_release_fb_mem;
1460 } 1458 }
1461 memset(par->v_palette_base, 0, PALETTE_SIZE);
1462 1459
1463 par->irq = platform_get_irq(device, 0); 1460 par->irq = platform_get_irq(device, 0);
1464 if (par->irq < 0) { 1461 if (par->irq < 0) {