Commit f951dd05 authored by Peter Huewe's avatar Peter Huewe Committed by Greg Kroah-Hartman

staging/xgifb: Consolidate if branches with similar conditions

1) The same condition (pVBInfo->IF_DEF_LVDS == 0) was checked in the if
clause directly in front of this one.

2) The same condition pVBInfo->VBType & (VB_SIS301B | VB_SIS302B |
VB_SIS301LV | VB_SIS302LV | VB_XGI301C) was checked in the if
clause directly in front of this one.
Signed-off-by: default avatarPeter Huewe <peterhuewe@gmx.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 826215d9
...@@ -2299,9 +2299,7 @@ static unsigned char XGI_GetLCDInfo(unsigned short ModeNo, ...@@ -2299,9 +2299,7 @@ static unsigned char XGI_GetLCDInfo(unsigned short ModeNo,
& VB_XGI301C)) && (tempax & XGI_LCDDualLink)) { & VB_XGI301C)) && (tempax & XGI_LCDDualLink)) {
tempbx |= SetLCDDualLink; tempbx |= SetLCDDualLink;
} }
}
if (pVBInfo->IF_DEF_LVDS == 0) {
if ((pVBInfo->LCDResInfo == Panel_1400x1050) && (pVBInfo->VBInfo if ((pVBInfo->LCDResInfo == Panel_1400x1050) && (pVBInfo->VBInfo
& SetCRT2ToLCD) && (resinfo == 9) && & SetCRT2ToLCD) && (resinfo == 9) &&
(!(tempbx & EnableScalingLCD))) (!(tempbx & EnableScalingLCD)))
...@@ -5024,12 +5022,8 @@ static void XGI_SetLCDCap(struct vb_device_info *pVBInfo) ...@@ -5024,12 +5022,8 @@ static void XGI_SetLCDCap(struct vb_device_info *pVBInfo)
tempcx = pVBInfo->LCDCapList[XGI_GetLCDCapPtr(pVBInfo)].LCD_Capability; tempcx = pVBInfo->LCDCapList[XGI_GetLCDCapPtr(pVBInfo)].LCD_Capability;
if (pVBInfo->VBType & if (pVBInfo->VBType & (VB_SIS301B | VB_SIS302B | VB_SIS301LV |
(VB_SIS301B | VB_SIS302LV | VB_XGI301C)) {
VB_SIS302B |
VB_SIS301LV |
VB_SIS302LV |
VB_XGI301C)) { /* 301LV/302LV only */
if (pVBInfo->VBType & if (pVBInfo->VBType &
(VB_SIS301LV | VB_SIS302LV | VB_XGI301C)) { (VB_SIS301LV | VB_SIS302LV | VB_XGI301C)) {
/* Set 301LV Capability */ /* Set 301LV Capability */
...@@ -5041,10 +5035,7 @@ static void XGI_SetLCDCap(struct vb_device_info *pVBInfo) ...@@ -5041,10 +5035,7 @@ static void XGI_SetLCDCap(struct vb_device_info *pVBInfo)
~((EnableVBCLKDRVLOW | EnablePLLSPLOW) >> 8), ~((EnableVBCLKDRVLOW | EnablePLLSPLOW) >> 8),
(unsigned short) ((tempcx & (EnableVBCLKDRVLOW (unsigned short) ((tempcx & (EnableVBCLKDRVLOW
| EnablePLLSPLOW)) >> 8)); | EnablePLLSPLOW)) >> 8));
}
if (pVBInfo->VBType & (VB_SIS301B | VB_SIS302B | VB_SIS301LV
| VB_SIS302LV | VB_XGI301C)) {
if (pVBInfo->VBInfo & SetCRT2ToLCD) if (pVBInfo->VBInfo & SetCRT2ToLCD)
XGI_SetLCDCap_B(tempcx, pVBInfo); XGI_SetLCDCap_B(tempcx, pVBInfo);
else if (pVBInfo->VBInfo & XGI_SetCRT2ToLCDA) else if (pVBInfo->VBInfo & XGI_SetCRT2ToLCDA)
......
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