video: fbdev: sis: fix duplicated code for different branches

Refactor code in order to avoid identical code for different branches.

This issue was detected with the help of Coccinelle.

Addresses-Coverity-ID: 1226761
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Cc: Thomas Winischhofer <thomas@winischhofer.net>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>

authored by

Gustavo A. R. Silva and committed by
Bartlomiej Zolnierkiewicz
d3e329b3 a7582733

+3 -12
+3 -12
drivers/video/fbdev/sis/init301.c
··· 6848 if(SiS_Pr->SiS_VGAHDE >= 1280) { 6849 tempch = 20; 6850 tempbx &= ~0x20; 6851 - } else if(SiS_Pr->SiS_VGAHDE >= 1024) { 6852 - tempch = 25; 6853 } else { 6854 tempch = 25; /* OK */ 6855 } ··· 7962 } 7963 } 7964 } else { /* ---- PAL ---- */ 7965 - /* We don't play around with FSCI in PAL mode */ 7966 - if(resindex == 0x04) { 7967 - SiS_SetCH70xxANDOR(SiS_Pr,0x20,0x00,0xEF); /* loop filter off */ 7968 - SiS_SetCH70xxANDOR(SiS_Pr,0x21,0x01,0xFE); /* ACIV on */ 7969 - } else { 7970 - SiS_SetCH70xxANDOR(SiS_Pr,0x20,0x00,0xEF); /* loop filter off */ 7971 - SiS_SetCH70xxANDOR(SiS_Pr,0x21,0x01,0xFE); /* ACIV on */ 7972 - } 7973 } 7974 7975 #endif /* 300 */ ··· 9650 delay = 0x0a; 9651 } else if(IS_SIS740) { 9652 delay = 0x00; 9653 - } else if(SiS_Pr->ChipType < SIS_330) { 9654 - delay = 0x0c; 9655 } else { 9656 delay = 0x0c; 9657 }
··· 6848 if(SiS_Pr->SiS_VGAHDE >= 1280) { 6849 tempch = 20; 6850 tempbx &= ~0x20; 6851 } else { 6852 tempch = 25; /* OK */ 6853 } ··· 7964 } 7965 } 7966 } else { /* ---- PAL ---- */ 7967 + /* We don't play around with FSCI in PAL mode */ 7968 + SiS_SetCH70xxANDOR(SiS_Pr, 0x20, 0x00, 0xEF); /* loop filter off */ 7969 + SiS_SetCH70xxANDOR(SiS_Pr, 0x21, 0x01, 0xFE); /* ACIV on */ 7970 } 7971 7972 #endif /* 300 */ ··· 9657 delay = 0x0a; 9658 } else if(IS_SIS740) { 9659 delay = 0x00; 9660 } else { 9661 delay = 0x0c; 9662 }