Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5fc699f6 authored by Peter Huewe's avatar Peter Huewe Committed by Greg Kroah-Hartman
Browse files

staging/xgifb: Remove redundant if statement



The code checks twice for if (pVBInfo->VBInfo & SetCRT2ToTV) without any
changes in between -> we can remove the second check.
And while at it we can also save the temp variable and use tempbx
directly.

Signed-off-by: default avatarPeter Huewe <peterhuewe@gmx.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a9e29e6d
Loading
Loading
Loading
Loading
+14 −20
Original line number Original line Diff line number Diff line
@@ -2197,18 +2197,13 @@ static void XGI_GetVBInfo(unsigned short ModeNo, unsigned short ModeIdIndex,
static void XGI_GetTVInfo(unsigned short ModeNo, unsigned short ModeIdIndex,
static void XGI_GetTVInfo(unsigned short ModeNo, unsigned short ModeIdIndex,
		struct vb_device_info *pVBInfo)
		struct vb_device_info *pVBInfo)
{
{
	unsigned short temp, tempbx = 0, resinfo = 0, modeflag, index1;
	unsigned short tempbx = 0, resinfo = 0, modeflag, index1;

	tempbx = 0;
	resinfo = 0;


	if (pVBInfo->VBInfo & SetCRT2ToTV) {
	if (pVBInfo->VBInfo & SetCRT2ToTV) {
		modeflag = XGI330_EModeIDTable[ModeIdIndex].Ext_ModeFlag;
		modeflag = XGI330_EModeIDTable[ModeIdIndex].Ext_ModeFlag;
		resinfo = XGI330_EModeIDTable[ModeIdIndex].Ext_RESINFO;
		resinfo = XGI330_EModeIDTable[ModeIdIndex].Ext_RESINFO;


		if (pVBInfo->VBInfo & SetCRT2ToTV) {
		tempbx = xgifb_reg_get(pVBInfo->P3d4, 0x35);
			temp = xgifb_reg_get(pVBInfo->P3d4, 0x35);
			tempbx = temp;
		if (tempbx & TVSetPAL) {
		if (tempbx & TVSetPAL) {
			tempbx &= (SetCHTVOverScan |
			tempbx &= (SetCHTVOverScan |
				   TVSetPALM |
				   TVSetPALM |
@@ -2221,7 +2216,6 @@ static void XGI_GetTVInfo(unsigned short ModeNo, unsigned short ModeIdIndex,
			tempbx &= (SetCHTVOverScan |
			tempbx &= (SetCHTVOverScan |
				   TVSetNTSCJ |
				   TVSetNTSCJ |
				   TVSetPAL);
				   TVSetPAL);
		}


		if (pVBInfo->IF_DEF_LVDS == 0) {
		if (pVBInfo->IF_DEF_LVDS == 0) {
			if (pVBInfo->VBInfo & SetCRT2ToSCART)
			if (pVBInfo->VBInfo & SetCRT2ToSCART)