Commit 3625c9a7 authored by Aaro Koskinen's avatar Aaro Koskinen Committed by Greg Kroah-Hartman

staging: xgifb: eliminate pVBInfo->StandTable

Access XGI330_StandTable directly and make it const.
Signed-off-by: default avatarAaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 6154e7f4
...@@ -23,7 +23,6 @@ static const unsigned short XGINew_VGA_DAC[] = { ...@@ -23,7 +23,6 @@ static const unsigned short XGINew_VGA_DAC[] = {
void InitTo330Pointer(unsigned char ChipType, struct vb_device_info *pVBInfo) void InitTo330Pointer(unsigned char ChipType, struct vb_device_info *pVBInfo)
{ {
pVBInfo->StandTable = &XGI330_StandTable;
pVBInfo->EModeIDTable = XGI330_EModeIDTable; pVBInfo->EModeIDTable = XGI330_EModeIDTable;
pVBInfo->RefIndex = XGI330_RefIndex; pVBInfo->RefIndex = XGI330_RefIndex;
pVBInfo->XGINEWUB_CRT1Table = XGI_CRT1Table; pVBInfo->XGINEWUB_CRT1Table = XGI_CRT1Table;
...@@ -91,7 +90,7 @@ static void XGI_SetSeqRegs(unsigned short ModeNo, ...@@ -91,7 +90,7 @@ static void XGI_SetSeqRegs(unsigned short ModeNo,
modeflag = pVBInfo->EModeIDTable[ModeIdIndex].Ext_ModeFlag; modeflag = pVBInfo->EModeIDTable[ModeIdIndex].Ext_ModeFlag;
xgifb_reg_set(pVBInfo->P3c4, 0x00, 0x03); /* Set SR0 */ xgifb_reg_set(pVBInfo->P3c4, 0x00, 0x03); /* Set SR0 */
tempah = pVBInfo->StandTable->SR[0]; tempah = XGI330_StandTable.SR[0];
i = XGI_SetCRT2ToLCDA; i = XGI_SetCRT2ToLCDA;
if (pVBInfo->VBInfo & XGI_SetCRT2ToLCDA) { if (pVBInfo->VBInfo & XGI_SetCRT2ToLCDA) {
...@@ -106,7 +105,7 @@ static void XGI_SetSeqRegs(unsigned short ModeNo, ...@@ -106,7 +105,7 @@ static void XGI_SetSeqRegs(unsigned short ModeNo,
for (i = 02; i <= 04; i++) { for (i = 02; i <= 04; i++) {
/* Get SR2,3,4 from file */ /* Get SR2,3,4 from file */
SRdata = pVBInfo->StandTable->SR[i - 1]; SRdata = XGI330_StandTable.SR[i - 1];
xgifb_reg_set(pVBInfo->P3c4, i, SRdata); /* Set SR2 3 4 */ xgifb_reg_set(pVBInfo->P3c4, i, SRdata); /* Set SR2 3 4 */
} }
} }
...@@ -123,7 +122,7 @@ static void XGI_SetCRTCRegs(struct xgi_hw_device_info *HwDeviceExtension, ...@@ -123,7 +122,7 @@ static void XGI_SetCRTCRegs(struct xgi_hw_device_info *HwDeviceExtension,
for (i = 0; i <= 0x18; i++) { for (i = 0; i <= 0x18; i++) {
/* Get CRTC from file */ /* Get CRTC from file */
CRTCdata = pVBInfo->StandTable->CRTC[i]; CRTCdata = XGI330_StandTable.CRTC[i];
xgifb_reg_set(pVBInfo->P3d4, i, CRTCdata); /* Set CRTC(3d4) */ xgifb_reg_set(pVBInfo->P3d4, i, CRTCdata); /* Set CRTC(3d4) */
} }
} }
...@@ -138,7 +137,7 @@ static void XGI_SetATTRegs(unsigned short ModeNo, ...@@ -138,7 +137,7 @@ static void XGI_SetATTRegs(unsigned short ModeNo,
modeflag = pVBInfo->EModeIDTable[ModeIdIndex].Ext_ModeFlag; modeflag = pVBInfo->EModeIDTable[ModeIdIndex].Ext_ModeFlag;
for (i = 0; i <= 0x13; i++) { for (i = 0; i <= 0x13; i++) {
ARdata = pVBInfo->StandTable->ATTR[i]; ARdata = XGI330_StandTable.ATTR[i];
if ((modeflag & Charx8Dot) && i == 0x13) { /* ifndef Dot9 */ if ((modeflag & Charx8Dot) && i == 0x13) { /* ifndef Dot9 */
if (pVBInfo->VBInfo & XGI_SetCRT2ToLCDA) { if (pVBInfo->VBInfo & XGI_SetCRT2ToLCDA) {
...@@ -169,7 +168,7 @@ static void XGI_SetGRCRegs(struct vb_device_info *pVBInfo) ...@@ -169,7 +168,7 @@ static void XGI_SetGRCRegs(struct vb_device_info *pVBInfo)
for (i = 0; i <= 0x08; i++) { for (i = 0; i <= 0x08; i++) {
/* Get GR from file */ /* Get GR from file */
GRdata = pVBInfo->StandTable->GRC[i]; GRdata = XGI330_StandTable.GRC[i];
xgifb_reg_set(pVBInfo->P3ce, i, GRdata); /* Set GR(3ce) */ xgifb_reg_set(pVBInfo->P3ce, i, GRdata); /* Set GR(3ce) */
} }
...@@ -5903,7 +5902,7 @@ static void XGI_SetCRT1Group(struct xgifb_video_info *xgifb_info, ...@@ -5903,7 +5902,7 @@ static void XGI_SetCRT1Group(struct xgifb_video_info *xgifb_info,
unsigned short RefreshRateTableIndex, temp; unsigned short RefreshRateTableIndex, temp;
XGI_SetSeqRegs(ModeNo, ModeIdIndex, pVBInfo); XGI_SetSeqRegs(ModeNo, ModeIdIndex, pVBInfo);
outb(pVBInfo->StandTable->MISC, pVBInfo->P3c2); outb(XGI330_StandTable.MISC, pVBInfo->P3c2);
XGI_SetCRTCRegs(HwDeviceExtension, pVBInfo); XGI_SetCRTCRegs(HwDeviceExtension, pVBInfo);
XGI_SetATTRegs(ModeNo, ModeIdIndex, pVBInfo); XGI_SetATTRegs(ModeNo, ModeIdIndex, pVBInfo);
XGI_SetGRCRegs(pVBInfo); XGI_SetGRCRegs(pVBInfo);
......
...@@ -183,7 +183,6 @@ struct vb_device_info { ...@@ -183,7 +183,6 @@ struct vb_device_info {
struct XGI_TimingHStruct TimingH; struct XGI_TimingHStruct TimingH;
struct XGI_TimingVStruct TimingV; struct XGI_TimingVStruct TimingV;
struct SiS_StandTable_S *StandTable;
struct XGI_ExtStruct *EModeIDTable; struct XGI_ExtStruct *EModeIDTable;
struct XGI_Ext2Struct *RefIndex; struct XGI_Ext2Struct *RefIndex;
struct XGI_CRT1TableStruct *XGINEWUB_CRT1Table; struct XGI_CRT1TableStruct *XGINEWUB_CRT1Table;
......
...@@ -200,7 +200,7 @@ static struct XGI_ExtStruct XGI330_EModeIDTable[] = { ...@@ -200,7 +200,7 @@ static struct XGI_ExtStruct XGI330_EModeIDTable[] = {
{0xff, 0x0000, 0x0000, 0x00, 0x00, 0x00} {0xff, 0x0000, 0x0000, 0x00, 0x00, 0x00}
}; };
static struct SiS_StandTable_S XGI330_StandTable = { static const struct SiS_StandTable_S XGI330_StandTable = {
/* ExtVGATable */ /* ExtVGATable */
0x00, 0x00, 0x00, 0x0000, 0x00, 0x00, 0x00, 0x0000,
{0x01, 0x0f, 0x00, 0x0e}, {0x01, 0x0f, 0x00, 0x0e},
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment