From a39800dd920f7196a960cb7fbe51edaf0d753b47 Mon Sep 17 00:00:00 2001 From: Ye Li Date: Mon, 29 Aug 2016 13:51:01 +0800 Subject: [PATCH] MLK-15324-1 video: cfb_console: Fix 64 bits support problem There are some integer to pointer convert. To support 64 bits system, change the unsigned int to unsigned long. Signed-off-by: Ye Li (cherry picked from commit c3b5c2df452eac82a970ba304e94550be8e27335) (cherry picked from commit 8a2330424ce8dff9ba9e51ccf74fa600ea93aeb1) --- drivers/video/cfb_console.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/video/cfb_console.c b/drivers/video/cfb_console.c index 636c3e8c18..4ffb92a217 100644 --- a/drivers/video/cfb_console.c +++ b/drivers/video/cfb_console.c @@ -1176,7 +1176,7 @@ static int display_rle8_bitmap(struct bmp_image *img, int xoff, int yoff, y = __le32_to_cpu(img->header.height) - 1; ncolors = __le32_to_cpu(img->header.colors_used); bpp = VIDEO_PIXEL_SIZE; - fbp = (unsigned char *) ((unsigned int) video_fb_address + + fbp = (unsigned char *) ((unsigned long) video_fb_address + (y + yoff) * VIDEO_LINE_LEN + xoff * bpp); @@ -1231,7 +1231,7 @@ static int display_rle8_bitmap(struct bmp_image *img, int xoff, int yoff, x = 0; y--; fbp = (unsigned char *) - ((unsigned int) video_fb_address + + ((unsigned long) video_fb_address + (y + yoff) * VIDEO_LINE_LEN + xoff * bpp); continue; @@ -1244,7 +1244,7 @@ static int display_rle8_bitmap(struct bmp_image *img, int xoff, int yoff, x += bm[2]; y -= bm[3]; fbp = (unsigned char *) - ((unsigned int) video_fb_address + + ((unsigned long) video_fb_address + (y + yoff) * VIDEO_LINE_LEN + xoff * bpp); bm += 4; @@ -2023,7 +2023,7 @@ static int cfg_video_init(void) if (pGD == NULL) return -1; - video_fb_address = (void *) VIDEO_FB_ADRS; + video_fb_address = (void *)(unsigned long) VIDEO_FB_ADRS; cfb_do_flush_cache = cfb_fb_is_in_dram() && dcache_status(); -- 2.17.1