Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0d0b4b4d authored by Joe Perches's avatar Joe Perches Committed by Tomi Valkeinen
Browse files

fbdev: da8xx-fb: Use dma_zalloc_coherent



Use the zeroing function instead of dma_alloc_coherent & memset(,0,)

Signed-off-by: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
parent 350f8eba
Loading
Loading
Loading
Loading
+3 −6
Original line number Diff line number Diff line
@@ -1447,10 +1447,8 @@ static int fb_probe(struct platform_device *device)
		da8xx_fb_fix.line_length - 1;

	/* allocate palette buffer */
	par->v_palette_base = dma_alloc_coherent(NULL,
					       PALETTE_SIZE,
					       (resource_size_t *)
					       &par->p_palette_base,
	par->v_palette_base = dma_zalloc_coherent(NULL, PALETTE_SIZE,
						  (resource_size_t *)&par->p_palette_base,
						  GFP_KERNEL | GFP_DMA);
	if (!par->v_palette_base) {
		dev_err(&device->dev,
@@ -1458,7 +1456,6 @@ static int fb_probe(struct platform_device *device)
		ret = -EINVAL;
		goto err_release_fb_mem;
	}
	memset(par->v_palette_base, 0, PALETTE_SIZE);

	par->irq = platform_get_irq(device, 0);
	if (par->irq < 0) {