Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

video: ocfb: Fix data type warning

When allocate framebuffer memory using dma_alloc_coherent(),
we'd better use dma_addr_t instead of phys_addr_t. Because the
address we got in fact is DMA or bus address for the platform.

This patch also fixes below build warning:
drivers/video/fbdev/ocfb.c:335:2:
warning: passing argument 3 of ‘dma_alloc_attrs’
from incompatible pointer type [enabled by default]

Signed-off-by: Qiang Chen <qiang2.chen@sonymobile.com>
Acked-by: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>

authored by

Qiang Chen and committed by
Tomi Valkeinen
77989ee8 77a7f183

+1 -1
+1 -1
drivers/video/fbdev/ocfb.c
··· 61 61 /* flag indicating whether the regs are little endian accessed */ 62 62 int little_endian; 63 63 /* Physical and virtual addresses of framebuffer */ 64 - phys_addr_t fb_phys; 64 + dma_addr_t fb_phys; 65 65 void __iomem *fb_virt; 66 66 u32 pseudo_palette[PALETTE_SIZE]; 67 67 };