staging: xgifb: eliminate pVBInfo->AGPReg
authorAaro Koskinen <aaro.koskinen@iki.fi>
Sun, 4 Nov 2012 19:15:05 +0000 (21:15 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 13 Nov 2012 20:54:30 +0000 (12:54 -0800)
Access XGI340_AGPReg 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_def.h
drivers/staging/xgifb/vb_init.c
drivers/staging/xgifb/vb_setmode.c
drivers/staging/xgifb/vb_struct.h
drivers/staging/xgifb/vb_table.h

index ee13b848dce26ea4e76d5c2220fcbc8edea06adb..148f6373c9a264e3848eeddf7e96b06e9a47d8de 100644 (file)
@@ -264,5 +264,6 @@ extern const struct XGI_CRT1TableStruct XGI_CRT1Table[];
 extern const struct XGI_ECLKDataStruct XGI340_ECLKData[];
 extern const struct SiS_VCLKData XGI_VCLKData[];
 extern const unsigned char XGI340_CR6B[][4];
+extern const unsigned char XGI340_AGPReg[];
 
 #endif
index 213ec1366a9edc7954bf21e52c232ebc49baf712..2b791c10eb15b2dc622c27d42b5b9ad95e2bcbd2 100644 (file)
@@ -1378,17 +1378,17 @@ unsigned char XGIInitNew(struct pci_dev *pdev)
                for (i = 0x47; i <= 0x4C; i++)
                        xgifb_reg_set(pVBInfo->P3d4,
                                      i,
-                                     pVBInfo->AGPReg[i - 0x47]);
+                                     XGI340_AGPReg[i - 0x47]);
 
                for (i = 0x70; i <= 0x71; i++)
                        xgifb_reg_set(pVBInfo->P3d4,
                                      i,
-                                     pVBInfo->AGPReg[6 + i - 0x70]);
+                                     XGI340_AGPReg[6 + i - 0x70]);
 
                for (i = 0x74; i <= 0x77; i++)
                        xgifb_reg_set(pVBInfo->P3d4,
                                      i,
-                                     pVBInfo->AGPReg[8 + i - 0x74]);
+                                     XGI340_AGPReg[8 + i - 0x74]);
 
                pci_read_config_dword(pdev, 0x50, &Temp);
                Temp >>= 20;
index 4d50940899ce9e06915d174a316af4933c5f87ae..eaa5686a5fc5a82a9c6d0c5175f4e75161283162 100644 (file)
@@ -33,7 +33,6 @@ void InitTo330Pointer(unsigned char ChipType, struct vb_device_info *pVBInfo)
 
        pVBInfo->SR15 = XGI340_SR13;
        pVBInfo->CR40 = XGI340_cr41;
-       pVBInfo->AGPReg = XGI340_AGPReg;
 
        /* 310 customization related */
        if ((pVBInfo->VBType & VB_SIS301LV) || (pVBInfo->VBType & VB_SIS302LV))
index 407b4a7c1009a4d16031c5d194b39480f75493ba..60aecb4af2683546a84eb4bf7f4e05ab1f65de1d 100644 (file)
@@ -161,7 +161,6 @@ struct vb_device_info {
        unsigned char (*SR15)[8];
        unsigned char (*CR40)[8];
 
-       unsigned char  *AGPReg;
        struct SiS_MCLKData  *MCLKData;
 
        unsigned char   *pXGINew_DRAMTypeDefinition;
index f0fd0ecba1558338717c90159ba71a88cc251925..4d7a70e7bdf836821db7316450d3a3d09858bcc7 100644 (file)
@@ -115,7 +115,7 @@ const unsigned char XGI340_CR6B[8][4] = {
 };
 
 /* CR47,CR48,CR49,CR4A,CR4B,CR4C,CR70,CR71,CR74,CR75,CR76,CR77 */
-static unsigned char XGI340_AGPReg[12] = {
+const unsigned char XGI340_AGPReg[12] = {
        0x28, 0x23, 0x00, 0x20, 0x00, 0x20,
        0x00, 0x05, 0xd0, 0x10, 0x10, 0x00
 };