staging: xgifb: XGI_GetLcdPtr: delete redundant code
authorAaro Koskinen <aaro.koskinen@iki.fi>
Sun, 4 Nov 2012 19:14:45 +0000 (21:14 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 13 Nov 2012 20:54:18 +0000 (12:54 -0800)
tempal is a write-only stack variable, and code touching it can be
deleted.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/xgifb/vb_setmode.c

index 276cd1537e078ded001fc177359d8cfd54cc9b26..9aa923cfdfdf7c3a2ab318a22ad515ba3129cf14 100644 (file)
@@ -1310,30 +1310,13 @@ static void *XGI_GetLcdPtr(unsigned short BX, unsigned short ModeNo,
                unsigned short RefreshRateTableIndex,
                struct vb_device_info *pVBInfo)
 {
-       unsigned short i, tempdx, tempbx, tempal, modeflag;
+       unsigned short i, tempdx, tempbx, modeflag;
 
        struct XGI330_LCDDataTablStruct *tempdi = NULL;
 
        tempbx = BX;
 
        modeflag = pVBInfo->EModeIDTable[ModeIdIndex].Ext_ModeFlag;
-       tempal = pVBInfo->RefIndex[RefreshRateTableIndex].Ext_CRT2CRTC;
-
-       tempal = tempal & 0x0f;
-
-       if (tempbx <= 1) { /* ExpLink */
-               tempal = pVBInfo->RefIndex[RefreshRateTableIndex].Ext_CRT2CRTC;
-
-               if (pVBInfo->VBInfo & XGI_SetCRT2ToLCDA) {
-                       tempal = pVBInfo->RefIndex[RefreshRateTableIndex].
-                                                       Ext_CRT2CRTC2;
-               }
-
-               if (tempbx & 0x01)
-                       tempal = (tempal >> 4);
-
-               tempal = (tempal & 0x0f);
-       }
 
        switch (tempbx) {
        case 0: