staging: xgifb: eliminate pVBInfo->UpdateCRT1
authorAaro Koskinen <aaro.koskinen@iki.fi>
Sun, 4 Nov 2012 19:14:55 +0000 (21:14 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 13 Nov 2012 20:54:20 +0000 (12:54 -0800)
Access XGI_UpdateCRT1Table directly and make it const.

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

index 7ee42ac8e3ab171f1bdfbb8e350e57acef3b0fea..59423addd2c6f93a215b40dda66cf2d472d19bc1 100644 (file)
@@ -49,8 +49,6 @@ void InitTo330Pointer(unsigned char ChipType, struct vb_device_info *pVBInfo)
        pVBInfo->SR21 = 0xa3;
        pVBInfo->SR22 = 0xfb;
 
-       pVBInfo->UpdateCRT1 = XGI_UpdateCRT1Table;
-
        /* 310 customization related */
        if ((pVBInfo->VBType & VB_SIS301LV) || (pVBInfo->VBType & VB_SIS302LV))
                pVBInfo->LCDCapList = XGI_LCDDLCapList;
@@ -729,13 +727,13 @@ static void XGI_UpdateXG21CRTC(unsigned short ModeNo,
 
        if (index != -1) {
                xgifb_reg_set(pVBInfo->P3d4, 0x02,
-                               pVBInfo->UpdateCRT1[index].CR02);
+                               XGI_UpdateCRT1Table[index].CR02);
                xgifb_reg_set(pVBInfo->P3d4, 0x03,
-                               pVBInfo->UpdateCRT1[index].CR03);
+                               XGI_UpdateCRT1Table[index].CR03);
                xgifb_reg_set(pVBInfo->P3d4, 0x15,
-                               pVBInfo->UpdateCRT1[index].CR15);
+                               XGI_UpdateCRT1Table[index].CR15);
                xgifb_reg_set(pVBInfo->P3d4, 0x16,
-                               pVBInfo->UpdateCRT1[index].CR16);
+                               XGI_UpdateCRT1Table[index].CR16);
        }
 }
 
index 8bfbfab0464323aef84f513708341db04211aef2..e73ccd57e24093aa442c4eee6806064aac655bfe 100644 (file)
@@ -187,7 +187,6 @@ struct vb_device_info {
        struct SiS_VBVCLKData  *VBVCLKData;
        struct SiS_StResInfo_S   *StResInfo;
        struct SiS_ModeResInfo_S *ModeResInfo;
-       struct XGI_XG21CRT1Struct         *UpdateCRT1;
 
        int ram_type;
        int ram_channel;
index e83c4259ce2808f46a51f90e3795907088a44975..c08c04eaad0e187cfed50cf6d0d5bbae651cb972 100644 (file)
@@ -216,7 +216,7 @@ static const struct SiS_StandTable_S XGI330_StandTable = {
         0xff}
 };
 
-static struct XGI_XG21CRT1Struct XGI_UpdateCRT1Table[] = {
+static const struct XGI_XG21CRT1Struct XGI_UpdateCRT1Table[] = {
        {0x01, 0x27, 0x91, 0x8f, 0xc0}, /* 00 */
        {0x03, 0x4f, 0x83, 0x8f, 0xc0}, /* 01 */
        {0x05, 0x27, 0x91, 0x8f, 0xc0}, /* 02 */