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

Staging: xgifb: Rework conditions in XGI_GetVBInfo().

Rework some conditions to reduce indentation and fix style warnings.
Signed-off-by: default avatarMiguel Gómez <magomez@igalia.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 7eec23a7
...@@ -2611,7 +2611,9 @@ static void XGI_GetVBInfo(unsigned short ModeNo, unsigned short ModeIdIndex, ...@@ -2611,7 +2611,9 @@ static void XGI_GetVBInfo(unsigned short ModeNo, unsigned short ModeIdIndex,
pVBInfo->ModeType = modeflag & ModeTypeMask; pVBInfo->ModeType = modeflag & ModeTypeMask;
tempbx = 0; tempbx = 0;
if (pVBInfo->VBType & 0xFFFF) { if (!(pVBInfo->VBType & 0xFFFF))
return;
/* Check Display Device */ /* Check Display Device */
temp = xgifb_reg_get(pVBInfo->P3d4, 0x30); temp = xgifb_reg_get(pVBInfo->P3d4, 0x30);
tempbx = tempbx | temp; tempbx = tempbx | temp;
...@@ -2629,22 +2631,18 @@ static void XGI_GetVBInfo(unsigned short ModeNo, unsigned short ModeIdIndex, ...@@ -2629,22 +2631,18 @@ static void XGI_GetVBInfo(unsigned short ModeNo, unsigned short ModeIdIndex,
if (pVBInfo->IF_DEF_LCDA == 1) { if (pVBInfo->IF_DEF_LCDA == 1) {
if ((HwDeviceExtension->jChipType >= XG20) || if (((HwDeviceExtension->jChipType >= XG20) ||
(HwDeviceExtension->jChipType >= XG40)) { (HwDeviceExtension->jChipType >= XG40)) &&
if (pVBInfo->IF_DEF_LVDS == 0) { (pVBInfo->IF_DEF_LVDS == 0)) {
if (pVBInfo->VBType & if (pVBInfo->VBType &
(VB_SIS302B | (VB_SIS302B |
VB_SIS301LV | VB_SIS301LV |
VB_SIS302LV | VB_SIS302LV |
VB_XGI301C)) { VB_XGI301C)) {
if (temp & EnableDualEdge) { if (temp & EnableDualEdge) {
tempbx |= tempbx |= SetCRT2ToDualEdge;
SetCRT2ToDualEdge;
if (temp & SetToLCDA) if (temp & SetToLCDA)
tempbx |= tempbx |= XGI_SetCRT2ToLCDA;
XGI_SetCRT2ToLCDA;
}
} }
} }
} }
...@@ -2791,7 +2789,6 @@ static void XGI_GetVBInfo(unsigned short ModeNo, unsigned short ModeIdIndex, ...@@ -2791,7 +2789,6 @@ static void XGI_GetVBInfo(unsigned short ModeNo, unsigned short ModeIdIndex,
pVBInfo->SetFlag |= ReserveTVOption; pVBInfo->SetFlag |= ReserveTVOption;
} }
} }
}
pVBInfo->VBInfo = tempbx; pVBInfo->VBInfo = tempbx;
} }
......
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