staging: xgifb: eliminate pVBInfo->SR21/22/25
authorAaro Koskinen <aaro.koskinen@iki.fi>
Sun, 4 Nov 2012 19:15:02 +0000 (21:15 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 13 Nov 2012 20:54:29 +0000 (12:54 -0800)
In-line constants that are used only once.

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

index 46f9aa58bbaf580a57038ba434081c1d99e88efd..a519d3005a429aea4daa7106e938dd5f36d234ca 100644 (file)
 #define XGI330_SR1F 0
 #define XGI330_SR23 0xf6
 #define XGI330_SR24 0x0d
-#define XGI330_SR25 0
 #define XGI330_SR31 0xc0
 #define XGI330_SR32 0x11
 #define XGI330_SR33 0
index 1be740cda81aaed847b0e6d66d05638ee0c9926c..8f6090b6ffd8b3663d659ed7f9e2136de41476df 100644 (file)
@@ -1401,7 +1401,7 @@ unsigned char XGIInitNew(struct pci_dev *pdev)
        /* Set PCI */
        xgifb_reg_set(pVBInfo->P3c4, 0x23, XGI330_SR23);
        xgifb_reg_set(pVBInfo->P3c4, 0x24, XGI330_SR24);
-       xgifb_reg_set(pVBInfo->P3c4, 0x25, XGI330_SR25);
+       xgifb_reg_set(pVBInfo->P3c4, 0x25, 0);
 
        if (HwDeviceExtension->jChipType < XG20) {
                /* Set VB */
@@ -1482,11 +1482,8 @@ unsigned char XGIInitNew(struct pci_dev *pdev)
 
        XGINew_SetDRAMSize_340(xgifb_info, HwDeviceExtension, pVBInfo);
 
-       xgifb_reg_set(pVBInfo->P3c4,
-                     0x22,
-                     (unsigned char) ((pVBInfo->SR22) & 0xFE));
-
-       xgifb_reg_set(pVBInfo->P3c4, 0x21, pVBInfo->SR21);
+       xgifb_reg_set(pVBInfo->P3c4, 0x22, 0xfa);
+       xgifb_reg_set(pVBInfo->P3c4, 0x21, 0xa3);
 
        XGINew_ChkSenseStatus(HwDeviceExtension, pVBInfo);
        XGINew_SetModeScratch(HwDeviceExtension, pVBInfo);
index 2ffa35e1e9dc08efcf545ec00e5446919283fd57..70912dc10c46d361fbf1679ceb5c94dc8dd8629b 100644 (file)
@@ -37,9 +37,6 @@ void InitTo330Pointer(unsigned char ChipType, struct vb_device_info *pVBInfo)
        pVBInfo->AGPReg = XGI340_AGPReg;
        pVBInfo->SR16 = XGI340_SR16;
 
-       pVBInfo->SR21 = 0xa3;
-       pVBInfo->SR22 = 0xfb;
-
        /* 310 customization related */
        if ((pVBInfo->VBType & VB_SIS301LV) || (pVBInfo->VBType & VB_SIS302LV))
                pVBInfo->LCDCapList = XGI_LCDDLCapList;
index 8353f16925422d7b0ba506595bf7ad8134d8faac..201fcc5b58ff157218f5062e0d0616ad3fb285fc 100644 (file)
@@ -165,9 +165,6 @@ struct vb_device_info {
 
        unsigned char  *AGPReg;
        unsigned char  *SR16;
-       unsigned char  SR21;
-       unsigned char  SR22;
-       unsigned char  SR25;
        struct SiS_MCLKData  *MCLKData;
 
        unsigned char   *pXGINew_DRAMTypeDefinition;