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

Staging: xgifb: Rework conditions in XGI_EnableBridge().

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 470c5338
...@@ -6472,34 +6472,26 @@ static void XGI_EnableBridge(struct xgifb_video_info *xgifb_info, ...@@ -6472,34 +6472,26 @@ static void XGI_EnableBridge(struct xgifb_video_info *xgifb_info,
if (!(pVBInfo->VBInfo & DisableCRT2Display)) { if (!(pVBInfo->VBInfo & DisableCRT2Display)) {
tempah = 0xc0; tempah = 0xc0;
if (!(pVBInfo->VBInfo & SetSimuScanMode)) { if (!(pVBInfo->VBInfo & SetSimuScanMode) &&
if (pVBInfo->VBInfo & XGI_SetCRT2ToLCDA) { (pVBInfo->VBInfo & XGI_SetCRT2ToLCDA) &&
if (pVBInfo->VBInfo & (pVBInfo->VBInfo & SetCRT2ToDualEdge)) {
SetCRT2ToDualEdge) {
tempah = tempah & 0x40; tempah = tempah & 0x40;
if (pVBInfo->VBInfo & if (pVBInfo->VBInfo & XGI_SetCRT2ToLCDA)
XGI_SetCRT2ToLCDA)
tempah = tempah ^ 0xC0; tempah = tempah ^ 0xC0;
if (pVBInfo->SetFlag & if (pVBInfo->SetFlag & DisableChB)
DisableChB)
tempah &= 0xBF; tempah &= 0xBF;
if (pVBInfo->SetFlag & if (pVBInfo->SetFlag & DisableChA)
DisableChA)
tempah &= 0x7F; tempah &= 0x7F;
if (pVBInfo->SetFlag & if (pVBInfo->SetFlag & EnableChB)
EnableChB)
tempah |= 0x40; tempah |= 0x40;
if (pVBInfo->SetFlag & if (pVBInfo->SetFlag & EnableChA)
EnableChA)
tempah |= 0x80; tempah |= 0x80;
} }
} }
}
}
/* EnablePart4_1F */ /* EnablePart4_1F */
xgifb_reg_or(pVBInfo->Part4Port, 0x1F, tempah); xgifb_reg_or(pVBInfo->Part4Port, 0x1F, tempah);
......
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