staging: xgifb: call XGI_GetVBType from InitTo330Pointer

Move XGI_GetVBType call inside InitTo330Pointer to avoid code duplication.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Aaro Koskinen 2013-05-29 23:59:02 +03:00 коммит произвёл Greg Kroah-Hartman
Родитель 4b8071121d
Коммит ce76de5abe
2 изменённых файлов: 3 добавлений и 7 удалений

Просмотреть файл

@ -1212,10 +1212,6 @@ unsigned char XGIInitNew(struct pci_dev *pdev)
outb(0x67, pVBInfo->P3c2); outb(0x67, pVBInfo->P3c2);
if (HwDeviceExtension->jChipType < XG20)
/* Run XGI_GetVBType before InitTo330Pointer */
XGI_GetVBType(pVBInfo);
InitTo330Pointer(HwDeviceExtension->jChipType, pVBInfo); InitTo330Pointer(HwDeviceExtension->jChipType, pVBInfo);
/* Openkey */ /* Openkey */

Просмотреть файл

@ -35,6 +35,9 @@ void InitTo330Pointer(unsigned char ChipType, struct vb_device_info *pVBInfo)
pVBInfo->SR18 = XGI340_SR18; pVBInfo->SR18 = XGI340_SR18;
pVBInfo->CR40 = XGI340_cr41; pVBInfo->CR40 = XGI340_cr41;
if (ChipType < XG20)
XGI_GetVBType(pVBInfo);
/* 310 customization related */ /* 310 customization related */
if ((pVBInfo->VBType & VB_SIS301LV) || (pVBInfo->VBType & VB_SIS302LV)) if ((pVBInfo->VBType & VB_SIS301LV) || (pVBInfo->VBType & VB_SIS302LV))
pVBInfo->LCDCapList = XGI_LCDDLCapList; pVBInfo->LCDCapList = XGI_LCDDLCapList;
@ -5734,9 +5737,6 @@ unsigned char XGISetModeNew(struct xgifb_video_info *xgifb_info,
} }
} }
if (HwDeviceExtension->jChipType < XG20)
XGI_GetVBType(pVBInfo);
InitTo330Pointer(HwDeviceExtension->jChipType, pVBInfo); InitTo330Pointer(HwDeviceExtension->jChipType, pVBInfo);
if (ModeNo & 0x80) if (ModeNo & 0x80)
ModeNo = ModeNo & 0x7F; ModeNo = ModeNo & 0x7F;