From 258c0ea21d3aa974b43e5ce6c2f7c94553a3b1cc Mon Sep 17 00:00:00 2001 From: =?utf8?q?Thomas=20Niederpr=C3=BCm?= Date: Tue, 31 Mar 2015 20:27:07 +0200 Subject: [PATCH] fbdev: ssd1307fb: fix memory address smem_start. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit the smem_start pointer of the framebuffer info struct needs to hold the physical address rather than the logical address. Right now the logical address returned by kmalloc is stored. This patch converts this address to a physical address and thus fixes a driver crash on mmaping the framebuffer memory due to an access to the wrong memory address. Signed-off-by: Thomas Niederprüm Acked-by: Maxime Ripard Signed-off-by: Tomi Valkeinen --- drivers/video/fbdev/ssd1307fb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/video/fbdev/ssd1307fb.c b/drivers/video/fbdev/ssd1307fb.c index f7ed6d9016f7..61e0ce866506 100644 --- a/drivers/video/fbdev/ssd1307fb.c +++ b/drivers/video/fbdev/ssd1307fb.c @@ -515,7 +515,7 @@ static int ssd1307fb_probe(struct i2c_client *client, info->var.blue.offset = 0; info->screen_base = (u8 __force __iomem *)vmem; - info->fix.smem_start = (unsigned long)vmem; + info->fix.smem_start = __pa(vmem); info->fix.smem_len = vmem_size; fb_deferred_io_init(info); -- 2.39.2