staging: sm750fb: rearrange code
Rearrange the code to remove one exit label which also makes the code less indented and more readable. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
d11ac7cbcc
commit
f8fbc838f4
|
@ -261,7 +261,12 @@ static void lynxfb_ops_imageblit(struct fb_info *info,
|
||||||
pitch = info->fix.line_length;
|
pitch = info->fix.line_length;
|
||||||
Bpp = info->var.bits_per_pixel >> 3;
|
Bpp = info->var.bits_per_pixel >> 3;
|
||||||
|
|
||||||
if (image->depth == 1) {
|
/* TODO: Implement hardware acceleration for image->depth > 1 */
|
||||||
|
if (image->depth != 1) {
|
||||||
|
cfb_imageblit(info, image);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (info->fix.visual == FB_VISUAL_TRUECOLOR ||
|
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];
|
fgcol = ((u32 *)info->pseudo_palette)[image->fg_color];
|
||||||
|
@ -270,13 +275,7 @@ static void lynxfb_ops_imageblit(struct fb_info *info,
|
||||||
fgcol = image->fg_color;
|
fgcol = image->fg_color;
|
||||||
bgcol = image->bg_color;
|
bgcol = image->bg_color;
|
||||||
}
|
}
|
||||||
goto _do_work;
|
|
||||||
}
|
|
||||||
/* TODO: Implement hardware acceleration for image->depth > 1 */
|
|
||||||
cfb_imageblit(info, image);
|
|
||||||
return;
|
|
||||||
|
|
||||||
_do_work:
|
|
||||||
/*
|
/*
|
||||||
* If not use spin_lock, system will die if user load driver
|
* If not use spin_lock, system will die if user load driver
|
||||||
* and immediately unload driver frequently (dual)
|
* and immediately unload driver frequently (dual)
|
||||||
|
|
Loading…
Reference in New Issue