diff options
author | Aaro Koskinen <aaro.koskinen@iki.fi> | 2012-11-04 21:14:53 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-11-13 12:54:20 -0800 |
commit | a39325d24fec6f13a3c60afcca8e728b6aeda24e (patch) | |
tree | 2a912f91f7ba947753b63cfc9f2cd357a9f08903 /drivers/staging/xgifb/XGI_main_26.c | |
parent | b397992e883de4e38fec06abd19e654d319d817a (diff) |
staging: xgifb: eliminate pVBInfo->RefIndex
Access XGI330_RefIndex directly and make it const.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/xgifb/XGI_main_26.c')
-rw-r--r-- | drivers/staging/xgifb/XGI_main_26.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/staging/xgifb/XGI_main_26.c b/drivers/staging/xgifb/XGI_main_26.c index 4b88f97edab..263b1dc903b 100644 --- a/drivers/staging/xgifb/XGI_main_26.c +++ b/drivers/staging/xgifb/XGI_main_26.c @@ -73,7 +73,7 @@ static int XGIfb_mode_rate_to_dclock(struct vb_device_info *XGI_Pr, RefreshRateTableIndex = XGI_GetRatePtrCRT2(HwDeviceExtension, ModeNo, ModeIdIndex, XGI_Pr); - ClockIndex = XGI_Pr->RefIndex[RefreshRateTableIndex].Ext_CRTVCLK; + ClockIndex = XGI330_RefIndex[RefreshRateTableIndex].Ext_CRTVCLK; Clock = XGI_Pr->VCLKData[ClockIndex].CLOCK * 1000; @@ -101,7 +101,7 @@ static int XGIfb_mode_rate_to_ddata(struct vb_device_info *XGI_Pr, return 0; RefreshRateTableIndex = XGI_GetRatePtrCRT2(HwDeviceExtension, ModeNo, ModeIdIndex, XGI_Pr); - index = XGI_Pr->RefIndex[RefreshRateTableIndex].Ext_CRT1CRTC; + index = XGI330_RefIndex[RefreshRateTableIndex].Ext_CRT1CRTC; sr_data = XGI_Pr->XGINEWUB_CRT1Table[index].CR[5]; @@ -111,7 +111,7 @@ static int XGIfb_mode_rate_to_ddata(struct vb_device_info *XGI_Pr, HT = (cr_data & 0xff) | ((unsigned short) (sr_data & 0x03) << 8); A = HT + 5; - HDE = (XGI_Pr->RefIndex[RefreshRateTableIndex].XRes >> 3) - 1; + HDE = (XGI330_RefIndex[RefreshRateTableIndex].XRes >> 3) - 1; E = HDE + 1; cr_data = XGI_Pr->XGINEWUB_CRT1Table[index].CR[3]; @@ -162,7 +162,7 @@ static int XGIfb_mode_rate_to_ddata(struct vb_device_info *XGI_Pr, | ((unsigned short) (sr_data & 0x01) << 10); A = VT + 2; - VDE = XGI_Pr->RefIndex[RefreshRateTableIndex].YRes - 1; + VDE = XGI330_RefIndex[RefreshRateTableIndex].YRes - 1; E = VDE + 1; cr_data = XGI_Pr->XGINEWUB_CRT1Table[index].CR[10]; @@ -202,24 +202,24 @@ static int XGIfb_mode_rate_to_ddata(struct vb_device_info *XGI_Pr, *lower_margin = F; *vsync_len = C; - if (XGI_Pr->RefIndex[RefreshRateTableIndex].Ext_InfoFlag & 0x8000) + if (XGI330_RefIndex[RefreshRateTableIndex].Ext_InfoFlag & 0x8000) *sync &= ~FB_SYNC_VERT_HIGH_ACT; else *sync |= FB_SYNC_VERT_HIGH_ACT; - if (XGI_Pr->RefIndex[RefreshRateTableIndex].Ext_InfoFlag & 0x4000) + if (XGI330_RefIndex[RefreshRateTableIndex].Ext_InfoFlag & 0x4000) *sync &= ~FB_SYNC_HOR_HIGH_ACT; else *sync |= FB_SYNC_HOR_HIGH_ACT; *vmode = FB_VMODE_NONINTERLACED; - if (XGI_Pr->RefIndex[RefreshRateTableIndex].Ext_InfoFlag & 0x0080) + if (XGI330_RefIndex[RefreshRateTableIndex].Ext_InfoFlag & 0x0080) *vmode = FB_VMODE_INTERLACED; else { j = 0; while (XGI330_EModeIDTable[j].Ext_ModeID != 0xff) { if (XGI330_EModeIDTable[j].Ext_ModeID == - XGI_Pr->RefIndex[RefreshRateTableIndex].ModeID) { + XGI330_RefIndex[RefreshRateTableIndex].ModeID) { if (XGI330_EModeIDTable[j].Ext_ModeFlag & DoubleScanMode) { *vmode = FB_VMODE_DOUBLE; |