From: Peter Huewe Date: Fri, 15 Feb 2013 19:37:09 +0000 (+0100) Subject: staging/xgifb: Consolidate if/else if with identical code branches X-Git-Tag: upstream/snapshot3+hdmi~5696^2~15 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=66b43eb25759b5bf76465c97107dc45b73eeb0e3;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git staging/xgifb: Consolidate if/else if with identical code branches Both branches of this if statement execute the same code. Thus we can || them together and remove code duplication Signed-off-by: Peter Huewe Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/xgifb/vb_setmode.c b/drivers/staging/xgifb/vb_setmode.c index 3d5c424..0b134af 100644 --- a/drivers/staging/xgifb/vb_setmode.c +++ b/drivers/staging/xgifb/vb_setmode.c @@ -5572,13 +5572,10 @@ static void XGI_EnableBridge(struct xgifb_video_info *xgifb_info, if (pVBInfo->VBType & (VB_SIS301B | VB_SIS302B | VB_SIS301LV | VB_SIS302LV | VB_XGI301C)) { if (!(pVBInfo->SetFlag & DisableChA)) { - if (pVBInfo->SetFlag & EnableChA) { + if ((pVBInfo->SetFlag & EnableChA) || + (pVBInfo->VBInfo & SetCRT2ToDualEdge)) { /* Power on */ xgifb_reg_set(pVBInfo->Part1Port, 0x1E, 0x20); - } else if (pVBInfo->VBInfo & SetCRT2ToDualEdge) { - /* Power on */ - xgifb_reg_set(pVBInfo->Part1Port, - 0x1E, 0x20); } }