}
- if(fbcursor->set & (FB_CUR_SETSHAPE | FB_CUR_SETIMAGE))
- {
+ if(fbcursor->set & (FB_CUR_SETSHAPE | FB_CUR_SETIMAGE)) {
cursor->setData(cursor,
fbcursor->rop,
fbcursor->image.data,
if(image->depth == 1){
if(info->fix.visual == FB_VISUAL_TRUECOLOR ||
- info->fix.visual == FB_VISUAL_DIRECTCOLOR)
- {
+ info->fix.visual == FB_VISUAL_DIRECTCOLOR) {
fgcol = ((u32*)info->pseudo_palette)[image->fg_color];
bgcol = ((u32*)info->pseudo_palette)[image->bg_color];
- }
- else
- {
+ } else {
fgcol = image->fg_color;
bgcol = image->bg_color;
}
if(info->var.grayscale)
red = green = blue = (red * 77 + green * 151 + blue * 28) >> 8;
- if(var->bits_per_pixel == 8 && info->fix.visual == FB_VISUAL_PSEUDOCOLOR)
- {
+ if(var->bits_per_pixel == 8 && info->fix.visual == FB_VISUAL_PSEUDOCOLOR) {
red >>= 8;
green >>= 8;
blue >>= 8;
}
- if(info->fix.visual == FB_VISUAL_TRUECOLOR && regno < 256 )
- {
+ if(info->fix.visual == FB_VISUAL_TRUECOLOR && regno < 256 ) {
u32 val;
if(var->bits_per_pixel == 16 ||
var->bits_per_pixel == 32 ||
- var->bits_per_pixel == 24)
- {
+ var->bits_per_pixel == 24) {
val = chan_to_field(red, &var->red);
val |= chan_to_field(green, &var->green);
val |= chan_to_field(blue, &var->blue);
output->clear = hw_sm750_output_clear;
/* chip specific phase */
share->accel.de_wait = (share->revid == SM750LE_REVISION_ID)?hw_sm750le_deWait: hw_sm750_deWait;
- switch (spec_share->state.dataflow)
- {
+ switch (spec_share->state.dataflow) {
case sm750_simul_pri:
output->paths = sm750_pnc;
crtc->channel = sm750_primary;
};
- static const char * fixId[2]=
- {
+ static const char * fixId[2] = {
"sm750_fb1", "sm750_fb2",
};
pr_info("fix->mmio_start = %lx\n", fix->mmio_start);
fix->mmio_len = share->vidreg_size;
pr_info("fix->mmio_len = %x\n", fix->mmio_len);
- switch(var->bits_per_pixel)
- {
+ switch(var->bits_per_pixel) {
case 8:
fix->visual = FB_VISUAL_PSEUDOCOLOR;
break;
g_hwcursor &= ~0x2;
else if(!strncmp(opt, "nohwc", strlen("nohwc")))
g_hwcursor = 0;
- else
- {
+ else {
if(!g_fbmode[0]){
g_fbmode[0] = opt;
pr_info("find fbmode0 : %s\n", g_fbmode[0]);
}
}
#ifdef CAP_EXPANSION
- if(getExpRes(exp_res, &spec_share->state.xLCD, &spec_share->state.yLCD))
- {
+ if(getExpRes(exp_res, &spec_share->state.xLCD, &spec_share->state.yLCD)) {
/* seems exp_res is not valid*/
spec_share->state.xLCD = spec_share->state.yLCD = 0;
}
NO_PARAM:
if(share->revid != SM750LE_REVISION_ID){
- if(share->dual)
- {
+ if(share->dual) {
if(swap)
spec_share->state.dataflow = sm750_dual_swap;
else
fbidx = 0;
ALLOC_FB:
info[fbidx] = framebuffer_alloc(sizeof(struct lynxfb_par), &pdev->dev);
- if(!info[fbidx])
- {
+ if(!info[fbidx]) {
pr_err("Could not allocate framebuffer #%d.\n", fbidx);
if(fbidx == 0)
goto err_info0_alloc;
else
goto err_info1_alloc;
- }
- else
- {
+ } else {
struct lynxfb_par * par;
int errno;
pr_info("framebuffer #%d alloc okay\n", fbidx);
strsep() updates @options to pointer after the first found token
it also returns the pointer ahead the token.
*/
- while((opt = strsep(&options, ":"))!=NULL)
- {
+ while((opt = strsep(&options, ":"))!=NULL) {
/* options that mean for any lynx chips are configured here */
if(!strncmp(opt, "noaccel", strlen("noaccel")))
g_noaccel = 1;
#endif
else if(!strncmp(opt, "dual", strlen("dual")))
g_dualview = 1;
- else
- {
+ else {
strcat(tmp, opt);
tmp += strlen(opt);
if(options != NULL)