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

Staging: xgifb: Rework some conditions in XGI_SetCRT2ModeRegs().

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 b1bf998c
...@@ -5990,59 +5990,48 @@ static void XGI_SetCRT2ModeRegs(unsigned short ModeNo, ...@@ -5990,59 +5990,48 @@ static void XGI_SetCRT2ModeRegs(unsigned short ModeNo,
tempah = 0x08; tempah = 0x08;
tempbl = 0xf0; tempbl = 0xf0;
if (pVBInfo->VBInfo & DisableCRT2Display) { if (pVBInfo->VBInfo & DisableCRT2Display)
xgifb_reg_and_or(pVBInfo->Part1Port, 0x2e, tempbl, tempah); goto reg_and_or;
} else {
tempah = 0x00; tempah = 0x00;
tempbl = 0xff; tempbl = 0xff;
if (pVBInfo->VBInfo & (SetCRT2ToRAMDAC | SetCRT2ToTV if (!(pVBInfo->VBInfo & (SetCRT2ToRAMDAC | SetCRT2ToTV |
| SetCRT2ToLCD | XGI_SetCRT2ToLCDA)) { SetCRT2ToLCD | XGI_SetCRT2ToLCDA)))
goto reg_and_or;
if ((pVBInfo->VBInfo & XGI_SetCRT2ToLCDA) && if ((pVBInfo->VBInfo & XGI_SetCRT2ToLCDA) &&
(!(pVBInfo->VBInfo & SetSimuScanMode))) { (!(pVBInfo->VBInfo & SetSimuScanMode))) {
tempbl &= 0xf7; tempbl &= 0xf7;
tempah |= 0x01; tempah |= 0x01;
xgifb_reg_and_or(pVBInfo->Part1Port, 0x2e, goto reg_and_or;
tempbl, tempah); }
} else {
if (pVBInfo->VBInfo & XGI_SetCRT2ToLCDA) { if (pVBInfo->VBInfo & XGI_SetCRT2ToLCDA) {
tempbl &= 0xf7; tempbl &= 0xf7;
tempah |= 0x01; tempah |= 0x01;
} }
if (pVBInfo->VBInfo & if (!(pVBInfo->VBInfo & (SetCRT2ToRAMDAC | SetCRT2ToTV | SetCRT2ToLCD)))
(SetCRT2ToRAMDAC | goto reg_and_or;
SetCRT2ToTV |
SetCRT2ToLCD)) {
tempbl &= 0xf8; tempbl &= 0xf8;
tempah = 0x01; tempah = 0x01;
if (!(pVBInfo->VBInfo & SetInSlaveMode)) if (!(pVBInfo->VBInfo & SetInSlaveMode))
tempah |= 0x02; tempah |= 0x02;
if (!(pVBInfo->VBInfo & if (!(pVBInfo->VBInfo & SetCRT2ToRAMDAC)) {
SetCRT2ToRAMDAC)) {
tempah = tempah ^ 0x05; tempah = tempah ^ 0x05;
if (!(pVBInfo->VBInfo & if (!(pVBInfo->VBInfo & SetCRT2ToLCD))
SetCRT2ToLCD))
tempah = tempah ^ 0x01; tempah = tempah ^ 0x01;
} }
if (!(pVBInfo->VBInfo & if (!(pVBInfo->VBInfo & SetCRT2ToDualEdge))
SetCRT2ToDualEdge))
tempah |= 0x08; tempah |= 0x08;
xgifb_reg_and_or(pVBInfo->Part1Port,
0x2e, tempbl, tempah); reg_and_or:
} else { xgifb_reg_and_or(pVBInfo->Part1Port, 0x2e, tempbl, tempah);
xgifb_reg_and_or(pVBInfo->Part1Port,
0x2e, tempbl, tempah);
}
}
} else {
xgifb_reg_and_or(pVBInfo->Part1Port, 0x2e, tempbl,
tempah);
}
}
if (pVBInfo->VBInfo & (SetCRT2ToRAMDAC | SetCRT2ToTV | SetCRT2ToLCD if (pVBInfo->VBInfo & (SetCRT2ToRAMDAC | SetCRT2ToTV | SetCRT2ToLCD
| XGI_SetCRT2ToLCDA)) { | XGI_SetCRT2ToLCDA)) {
......
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