Skip to content

Commit

Permalink
Staging: xgifb: Rework conditions in XGI_EnableBridge().
Browse files Browse the repository at this point in the history
Rework some conditions to reduce indentation and fix style warnings.

Signed-off-by: Miguel Gómez <magomez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Miguel Gómez authored and Greg Kroah-Hartman committed Jul 11, 2012
1 parent 470c533 commit b1bf998
Showing 1 changed file with 18 additions and 26 deletions.
44 changes: 18 additions & 26 deletions drivers/staging/xgifb/vb_setmode.c
Original file line number Diff line number Diff line change
Expand Up @@ -6472,32 +6472,24 @@ static void XGI_EnableBridge(struct xgifb_video_info *xgifb_info,
if (!(pVBInfo->VBInfo & DisableCRT2Display)) {
tempah = 0xc0;

if (!(pVBInfo->VBInfo & SetSimuScanMode)) {
if (pVBInfo->VBInfo & XGI_SetCRT2ToLCDA) {
if (pVBInfo->VBInfo &
SetCRT2ToDualEdge) {
tempah = tempah & 0x40;
if (pVBInfo->VBInfo &
XGI_SetCRT2ToLCDA)
tempah = tempah ^ 0xC0;

if (pVBInfo->SetFlag &
DisableChB)
tempah &= 0xBF;

if (pVBInfo->SetFlag &
DisableChA)
tempah &= 0x7F;

if (pVBInfo->SetFlag &
EnableChB)
tempah |= 0x40;

if (pVBInfo->SetFlag &
EnableChA)
tempah |= 0x80;
}
}
if (!(pVBInfo->VBInfo & SetSimuScanMode) &&
(pVBInfo->VBInfo & XGI_SetCRT2ToLCDA) &&
(pVBInfo->VBInfo & SetCRT2ToDualEdge)) {
tempah = tempah & 0x40;
if (pVBInfo->VBInfo & XGI_SetCRT2ToLCDA)
tempah = tempah ^ 0xC0;

if (pVBInfo->SetFlag & DisableChB)
tempah &= 0xBF;

if (pVBInfo->SetFlag & DisableChA)
tempah &= 0x7F;

if (pVBInfo->SetFlag & EnableChB)
tempah |= 0x40;

if (pVBInfo->SetFlag & EnableChA)
tempah |= 0x80;
}
}

Expand Down

0 comments on commit b1bf998

Please sign in to comment.