瀏覽代碼

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>
Qiang Chen 11 年之前
父節點
當前提交
77989ee83c
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/video/fbdev/ocfb.c

+ 1 - 1
drivers/video/fbdev/ocfb.c

@@ -61,7 +61,7 @@ struct ocfb_dev {
 	/* flag indicating whether the regs are little endian accessed */
 	/* flag indicating whether the regs are little endian accessed */
 	int little_endian;
 	int little_endian;
 	/* Physical and virtual addresses of framebuffer */
 	/* Physical and virtual addresses of framebuffer */
-	phys_addr_t fb_phys;
+	dma_addr_t fb_phys;
 	void __iomem *fb_virt;
 	void __iomem *fb_virt;
 	u32 pseudo_palette[PALETTE_SIZE];
 	u32 pseudo_palette[PALETTE_SIZE];
 };
 };