diff options
Diffstat (limited to 'drivers/video/fbdev/s3c-fb.c')
-rw-r--r-- | drivers/video/fbdev/s3c-fb.c | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/drivers/video/fbdev/s3c-fb.c b/drivers/video/fbdev/s3c-fb.c index 288300035164..ba04d7a67829 100644 --- a/drivers/video/fbdev/s3c-fb.c +++ b/drivers/video/fbdev/s3c-fb.c @@ -284,7 +284,7 @@ static int s3c_fb_check_var(struct fb_var_screeninfo *var, /* 666 with one bit alpha/transparency */ var->transp.offset = 18; var->transp.length = 1; - /* drop through */ + /* fall through */ case 18: var->bits_per_pixel = 32; @@ -312,7 +312,7 @@ static int s3c_fb_check_var(struct fb_var_screeninfo *var, case 25: var->transp.length = var->bits_per_pixel - 24; var->transp.offset = 24; - /* drop through */ + /* fall through */ case 24: /* our 24bpp is unpacked, so 32bpp */ var->bits_per_pixel = 32; @@ -809,7 +809,7 @@ static int s3c_fb_blank(int blank_mode, struct fb_info *info) case FB_BLANK_POWERDOWN: wincon &= ~WINCONx_ENWIN; sfb->enabled &= ~(1 << index); - /* fall through to FB_BLANK_NORMAL */ + /* fall through - to FB_BLANK_NORMAL */ case FB_BLANK_NORMAL: /* disable the DMA and display 0x0 (black) */ @@ -1102,14 +1102,14 @@ static int s3c_fb_alloc_memory(struct s3c_fb *sfb, struct s3c_fb_win *win) dev_dbg(sfb->dev, "want %u bytes for window\n", size); - fbi->screen_base = dma_alloc_wc(sfb->dev, size, &map_dma, GFP_KERNEL); - if (!fbi->screen_base) + fbi->screen_buffer = dma_alloc_wc(sfb->dev, size, &map_dma, GFP_KERNEL); + if (!fbi->screen_buffer) return -ENOMEM; dev_dbg(sfb->dev, "mapped %x to %p\n", - (unsigned int)map_dma, fbi->screen_base); + (unsigned int)map_dma, fbi->screen_buffer); - memset(fbi->screen_base, 0x0, size); + memset(fbi->screen_buffer, 0x0, size); fbi->fix.smem_start = map_dma; return 0; @@ -1126,9 +1126,9 @@ static void s3c_fb_free_memory(struct s3c_fb *sfb, struct s3c_fb_win *win) { struct fb_info *fbi = win->fbinfo; - if (fbi->screen_base) + if (fbi->screen_buffer) dma_free_wc(sfb->dev, PAGE_ALIGN(fbi->fix.smem_len), - fbi->screen_base, fbi->fix.smem_start); + fbi->screen_buffer, fbi->fix.smem_start); } /** @@ -1186,10 +1186,8 @@ static int s3c_fb_probe_win(struct s3c_fb *sfb, unsigned int win_no, fbinfo = framebuffer_alloc(sizeof(struct s3c_fb_win) + palette_size * sizeof(u32), sfb->dev); - if (!fbinfo) { - dev_err(sfb->dev, "failed to allocate framebuffer\n"); - return -ENOENT; - } + if (!fbinfo) + return -ENOMEM; windata = sfb->pdata->win[win_no]; initmode = *sfb->pdata->vtiming; |