Commit 3339db8a authored by Miguel Gómez's avatar Miguel Gómez Committed by Greg Kroah-Hartman

Staging: xgifb: Refactor XGI_GetCRT2ResInfo().

Use a goto to remove one level of indentation, fixing style warnings.
Signed-off-by: default avatarMiguel Gómez <magomez@igalia.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f9317351
...@@ -3263,7 +3263,9 @@ static void XGI_GetCRT2ResInfo(unsigned short ModeNo, ...@@ -3263,7 +3263,9 @@ static void XGI_GetCRT2ResInfo(unsigned short ModeNo,
if (modeflag & DoubleScanMode) if (modeflag & DoubleScanMode)
yres *= 2; yres *= 2;
if (pVBInfo->VBInfo & SetCRT2ToLCD) { if (!(pVBInfo->VBInfo & SetCRT2ToLCD))
goto exit;
if (pVBInfo->IF_DEF_LVDS == 0) { if (pVBInfo->IF_DEF_LVDS == 0) {
if (pVBInfo->LCDResInfo == Panel_1600x1200) { if (pVBInfo->LCDResInfo == Panel_1600x1200) {
if (!(pVBInfo->LCDInfo & XGI_LCDVESATiming)) { if (!(pVBInfo->LCDInfo & XGI_LCDVESATiming)) {
...@@ -3286,8 +3288,7 @@ static void XGI_GetCRT2ResInfo(unsigned short ModeNo, ...@@ -3286,8 +3288,7 @@ static void XGI_GetCRT2ResInfo(unsigned short ModeNo,
if (pVBInfo->LCDResInfo == Panel_1024x768) { if (pVBInfo->LCDResInfo == Panel_1024x768) {
if (!(pVBInfo->LCDInfo & XGI_LCDVESATiming)) { if (!(pVBInfo->LCDInfo & XGI_LCDVESATiming)) {
if (!(pVBInfo->LCDInfo if (!(pVBInfo->LCDInfo & LCDNonExpanding)) {
& LCDNonExpanding)) {
if (yres == 350) if (yres == 350)
yres = 357; yres = 357;
else if (yres == 400) else if (yres == 400)
...@@ -3301,8 +3302,8 @@ static void XGI_GetCRT2ResInfo(unsigned short ModeNo, ...@@ -3301,8 +3302,8 @@ static void XGI_GetCRT2ResInfo(unsigned short ModeNo,
if (xres == 720) if (xres == 720)
xres = 640; xres = 640;
}
exit:
pVBInfo->VGAHDE = xres; pVBInfo->VGAHDE = xres;
pVBInfo->HDE = xres; pVBInfo->HDE = xres;
pVBInfo->VGAVDE = yres; pVBInfo->VGAVDE = yres;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment