i.MX Framebuffer: Cleanup Coding style
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
parent
24b9baf7a5
commit
66c8719b2e
1 changed files with 34 additions and 36 deletions
|
@ -1,6 +1,4 @@
|
|||
/*
|
||||
* linux/drivers/video/imxfb.c
|
||||
*
|
||||
* Freescale i.MX Frame Buffer device driver
|
||||
*
|
||||
* Copyright (C) 2004 Sascha Hauer, Pengutronix
|
||||
|
@ -181,7 +179,8 @@ static struct imxfb_rgb def_rgb_8 = {
|
|||
.transp = {.offset = 0, .length = 0,},
|
||||
};
|
||||
|
||||
static int imxfb_activate_var(struct fb_var_screeninfo *var, struct fb_info *info);
|
||||
static int imxfb_activate_var(struct fb_var_screeninfo *var,
|
||||
struct fb_info *info);
|
||||
|
||||
static inline u_int chan_to_field(u_int chan, struct fb_bitfield *bf)
|
||||
{
|
||||
|
@ -190,8 +189,7 @@ static inline u_int chan_to_field(u_int chan, struct fb_bitfield *bf)
|
|||
return chan << bf->offset;
|
||||
}
|
||||
|
||||
static int
|
||||
imxfb_setpalettereg(u_int regno, u_int red, u_int green, u_int blue,
|
||||
static int imxfb_setpalettereg(u_int regno, u_int red, u_int green, u_int blue,
|
||||
u_int trans, struct fb_info *info)
|
||||
{
|
||||
struct imxfb_info *fbi = info->par;
|
||||
|
@ -209,8 +207,7 @@ imxfb_setpalettereg(u_int regno, u_int red, u_int green, u_int blue,
|
|||
return ret;
|
||||
}
|
||||
|
||||
static int
|
||||
imxfb_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
|
||||
static int imxfb_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
|
||||
u_int trans, struct fb_info *info)
|
||||
{
|
||||
struct imxfb_info *fbi = info->par;
|
||||
|
@ -270,8 +267,7 @@ imxfb_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
|
|||
* yres, xres_virtual, yres_virtual, xoffset, yoffset, grayscale,
|
||||
* bitfields, horizontal timing, vertical timing.
|
||||
*/
|
||||
static int
|
||||
imxfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
|
||||
static int imxfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info)
|
||||
{
|
||||
struct imxfb_info *fbi = info->par;
|
||||
int rgbidx;
|
||||
|
@ -343,8 +339,7 @@ static int imxfb_set_par(struct fb_info *info)
|
|||
info->fix.visual = FB_VISUAL_STATIC_PSEUDOCOLOR;
|
||||
}
|
||||
|
||||
info->fix.line_length = var->xres_virtual *
|
||||
var->bits_per_pixel / 8;
|
||||
info->fix.line_length = var->xres_virtual * var->bits_per_pixel / 8;
|
||||
fbi->palette_size = var->bits_per_pixel == 8 ? 256 : 16;
|
||||
|
||||
imxfb_activate_var(var, info);
|
||||
|
@ -495,6 +490,7 @@ static int imxfb_activate_var(struct fb_var_screeninfo *var, struct fb_info *inf
|
|||
static int imxfb_suspend(struct platform_device *dev, pm_message_t state)
|
||||
{
|
||||
struct imxfb_info *fbi = platform_get_drvdata(dev);
|
||||
|
||||
pr_debug("%s\n", __func__);
|
||||
|
||||
imxfb_disable_controller(fbi);
|
||||
|
@ -504,6 +500,7 @@ static int imxfb_suspend(struct platform_device *dev, pm_message_t state)
|
|||
static int imxfb_resume(struct platform_device *dev)
|
||||
{
|
||||
struct imxfb_info *fbi = platform_get_drvdata(dev);
|
||||
|
||||
pr_debug("%s\n", __func__);
|
||||
|
||||
imxfb_enable_controller(fbi);
|
||||
|
@ -545,7 +542,8 @@ static int __init imxfb_init_fbinfo(struct platform_device *pdev)
|
|||
info->var.vmode = FB_VMODE_NONINTERLACED;
|
||||
|
||||
info->fbops = &imxfb_ops;
|
||||
info->flags = FBINFO_FLAG_DEFAULT | FBINFO_READS_FAST;
|
||||
info->flags = FBINFO_FLAG_DEFAULT |
|
||||
FBINFO_READS_FAST;
|
||||
|
||||
fbi->rgb[RGB_16] = &def_rgb_16;
|
||||
fbi->rgb[RGB_8] = &def_rgb_8;
|
||||
|
|
Loading…
Add table
Reference in a new issue