Staging: xgifb: Rework conditions in XGI_SetATTRegs().
authorMiguel Gómez <magomez@igalia.com>
Fri, 6 Jul 2012 10:40:45 +0000 (12:40 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 11 Jul 2012 23:59:30 +0000 (16:59 -0700)
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>
drivers/staging/xgifb/vb_setmode.c

index 3ba3c48..4b49705 100644 (file)
@@ -161,18 +161,15 @@ static void XGI_SetATTRegs(unsigned short ModeNo,
 
        for (i = 0; i <= 0x13; i++) {
                ARdata = pVBInfo->StandTable->ATTR[i];
-               if (modeflag & Charx8Dot) { /* ifndef Dot9 */
-                       if (i == 0x13) {
-                               if (pVBInfo->VBInfo & XGI_SetCRT2ToLCDA) {
+
+               if ((modeflag & Charx8Dot) && i == 0x13) { /* ifndef Dot9 */
+                       if (pVBInfo->VBInfo & XGI_SetCRT2ToLCDA) {
+                               ARdata = 0;
+                       } else {
+                               if ((pVBInfo->VBInfo &
+                                    (SetCRT2ToTV | SetCRT2ToLCD)) &&
+                                   (pVBInfo->VBInfo & SetInSlaveMode))
                                        ARdata = 0;
-                               } else {
-                                       if (pVBInfo->VBInfo & (SetCRT2ToTV
-                                                       | SetCRT2ToLCD)) {
-                                               if (pVBInfo->VBInfo &
-                                                   SetInSlaveMode)
-                                                       ARdata = 0;
-                                       }
-                               }
                        }
                }