lkml.org 
[lkml]   [2012]   [Jul]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 10/19] Staging: xgifb: Rework conditions in XGI_SetATTRegs().
    Date
    Rework some conditions to reduce indentation and fix style warnings.

    Signed-off-by: Miguel Gómez <magomez@igalia.com>
    ---
    drivers/staging/xgifb/vb_setmode.c | 19 ++++++++-----------
    1 file changed, 8 insertions(+), 11 deletions(-)

    diff --git a/drivers/staging/xgifb/vb_setmode.c b/drivers/staging/xgifb/vb_setmode.c
    index 3ba3c48..4b49705 100644
    --- a/drivers/staging/xgifb/vb_setmode.c
    +++ b/drivers/staging/xgifb/vb_setmode.c
    @@ -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;
    - }
    - }
    }
    }

    --
    1.7.9.5
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2012-07-05 17:41    [W:3.711 / U:0.008 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site