staging: xgifb: delete redundant XGIhw_ext fields
authorAaro Koskinen <aaro.koskinen@iki.fi>
Mon, 21 Feb 2011 22:14:26 +0000 (00:14 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 23 Feb 2011 22:22:15 +0000 (14:22 -0800)
pSR and pCR fields can be deleted with no changes in the functionality.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/xgifb/XGI_main_26.c
drivers/staging/xgifb/vgatypes.h

index 9fdfc543a92a97da7c0d14d1f4b2e826671e0724..5e69728623b7f1646a91bfc5ac35565c557c9af8 100644 (file)
@@ -3018,22 +3018,6 @@ static int __devinit xgifb_probe(struct pci_dev *pdev,
        /* XGIhw_ext.pQueryNorthBridgeSpace = &XGIfb_query_north_bridge_space; */
        strcpy(XGIhw_ext.szVBIOSVer, "0.84");
 
-       XGIhw_ext.pSR = vmalloc(sizeof(struct XGI_DSReg) * SR_BUFFER_SIZE);
-       if (XGIhw_ext.pSR == NULL) {
-               printk(KERN_ERR "XGIfb: Fatal error: Allocating SRReg space failed.\n");
-               ret = -ENODEV;
-               goto error;
-       }
-       XGIhw_ext.pSR[0].jIdx = XGIhw_ext.pSR[0].jVal = 0xFF;
-
-       XGIhw_ext.pCR = vmalloc(sizeof(struct XGI_DSReg) * CR_BUFFER_SIZE);
-       if (XGIhw_ext.pCR == NULL) {
-               printk(KERN_ERR "XGIfb: Fatal error: Allocating CRReg space failed.\n");
-               ret = -ENODEV;
-               goto error;
-       }
-       XGIhw_ext.pCR[0].jIdx = XGIhw_ext.pCR[0].jVal = 0xFF;
-
        if (!XGIvga_enabled) {
                /* Mapping Max FB Size for 315 Init */
                XGIhw_ext.pjVideoMemoryAddress = ioremap(xgi_video_info.video_base, 0x10000000);
@@ -3403,8 +3387,6 @@ error_0:
                           xgi_video_info.video_size);
 error:
        vfree(XGIhw_ext.pjVirtualRomBase);
-       vfree(XGIhw_ext.pSR);
-       vfree(XGIhw_ext.pCR);
        framebuffer_release(fb_info);
        return ret;
 }
index 92a9ee5b07ddea0b42b4176b22dbca0ea6da1c3c..dacdac3e204ca919e11ca21b75bc1e125a98b6be 100644 (file)
@@ -106,16 +106,6 @@ struct xgi_hw_device_info
     unsigned char bIsPowerSaving;     /* True: XGIInit() is invoked by power management,
                                    otherwise by 2nd adapter's initialzation */
 
-    struct XGI_DSReg  *pSR;             /* restore SR registers in initial function. */
-                                 /* end data :(idx, val) =  (FF, FF). */
-                                 /* Note : restore SR registers if  */
-                                 /* bSkipDramSizing = 1 */
-
-    struct XGI_DSReg  *pCR;             /* restore CR registers in initial function. */
-                                 /* end data :(idx, val) =  (FF, FF) */
-                                 /* Note : restore cR registers if  */
-                                 /* bSkipDramSizing = 1 */
-
        unsigned char(*pQueryVGAConfigSpace)(struct xgi_hw_device_info *,
                                            unsigned long, unsigned long,
                                            unsigned long *);