]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging/xgifb: simplify vga I/O ports handling
authorDmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Mon, 19 Mar 2012 17:50:13 +0000 (21:50 +0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 10 Apr 2012 16:52:58 +0000 (09:52 -0700)
XGIfb driver transfers integer port number through several typecasts via
pjIOAddress field. Drop that field completely and use vga_base field of
xgifb_info directly.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/xgifb/XGI_main_26.c
drivers/staging/xgifb/vb_init.c
drivers/staging/xgifb/vb_setmode.c
drivers/staging/xgifb/vgatypes.h

index bc542a57d2a09d92c7bfe3b744da069dccba418c..c55240b1608d28fd4e8840896809bbad15542a8e 100644 (file)
@@ -1924,7 +1924,7 @@ static int __devinit xgifb_probe(struct pci_dev *pdev,
                xgifb_info->display2_force = true;
        }
 
-       XGIRegInit(&xgifb_info->dev_info, (unsigned long)hw_info->pjIOAddress);
+       XGIRegInit(&xgifb_info->dev_info, xgifb_info->vga_base);
 
        xgifb_reg_set(XGISR, IND_SIS_PASSWORD, SIS_PASSWORD);
        reg1 = xgifb_reg_get(XGISR, IND_SIS_PASSWORD);
index 94d5c35e22fbce7af40f176692e70b4a1712efa3..a951ca4d8287a7138cc3a3407ff8ef27fd14024e 100644 (file)
@@ -1478,7 +1478,7 @@ unsigned char XGIInitNew(struct pci_dev *pdev)
 
        pVBInfo->FBAddr = HwDeviceExtension->pjVideoMemoryAddress;
 
-       pVBInfo->BaseAddr = (unsigned long) HwDeviceExtension->pjIOAddress;
+       pVBInfo->BaseAddr = xgifb_info->vga_base;
 
        /* Newdebugcode(0x99); */
 
index 2919924213c42fddacb5fa80802d943366f1d1a5..5a00e94c46f087ac370b718b25a8769b020263c5 100644 (file)
@@ -7387,7 +7387,7 @@ unsigned char XGISetModeNew(struct xgifb_video_info *xgifb_info,
        unsigned short ModeIdIndex;
        struct vb_device_info VBINF;
        struct vb_device_info *pVBInfo = &VBINF;
-       pVBInfo->BaseAddr = (unsigned long) HwDeviceExtension->pjIOAddress;
+       pVBInfo->BaseAddr = xgifb_info->vga_base;
        pVBInfo->IF_DEF_LVDS = 0;
        pVBInfo->IF_DEF_LCDA = 1;
 
index a7208e3158153b7a86361b17f0dc1a06fe45b264..30cdd1af81f13b3ca01a24a07759a663e0b2217f 100644 (file)
@@ -66,8 +66,6 @@ struct xgi_hw_device_info {
        unsigned long ulVideoMemorySize; /* size, in bytes, of the
                                            memory on the board */
 
-       unsigned char *pjIOAddress; /* base I/O address of VGA ports (0x3B0) */
-
        unsigned char jChipType; /* Used to Identify Graphics Chip */
                                 /* defined in the data structure type  */
                                 /* "XGI_CHIP_TYPE" */