diff options
author | Gustavo A. R. Silva <gustavo@embeddedor.com> | 2017-09-04 16:00:50 +0200 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> | 2017-09-04 16:00:50 +0200 |
commit | d3e329b3156699bd85d1aa7a5f792cd38d6a5fd3 (patch) | |
tree | 547489ade5442af92b7ae8513bdbe8da1db912aa /drivers/video | |
parent | a7582733ef7fa80d8e8a53717e73cf83b6f2152e (diff) |
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>
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/fbdev/sis/init301.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/drivers/video/fbdev/sis/init301.c b/drivers/video/fbdev/sis/init301.c index 20f7234e809e..1ec9c3e0e1d8 100644 --- a/drivers/video/fbdev/sis/init301.c +++ b/drivers/video/fbdev/sis/init301.c @@ -6848,8 +6848,6 @@ SiS_SetGroup2(struct SiS_Private *SiS_Pr, unsigned short ModeNo, unsigned short if(SiS_Pr->SiS_VGAHDE >= 1280) { tempch = 20; tempbx &= ~0x20; - } else if(SiS_Pr->SiS_VGAHDE >= 1024) { - tempch = 25; } else { tempch = 25; /* OK */ } @@ -7964,14 +7962,9 @@ SiS_SetCHTVReg(struct SiS_Private *SiS_Pr, unsigned short ModeNo, unsigned short } } } else { /* ---- PAL ---- */ - /* We don't play around with FSCI in PAL mode */ - if(resindex == 0x04) { - SiS_SetCH70xxANDOR(SiS_Pr,0x20,0x00,0xEF); /* loop filter off */ - SiS_SetCH70xxANDOR(SiS_Pr,0x21,0x01,0xFE); /* ACIV on */ - } else { - SiS_SetCH70xxANDOR(SiS_Pr,0x20,0x00,0xEF); /* loop filter off */ - SiS_SetCH70xxANDOR(SiS_Pr,0x21,0x01,0xFE); /* ACIV on */ - } + /* We don't play around with FSCI in PAL mode */ + SiS_SetCH70xxANDOR(SiS_Pr, 0x20, 0x00, 0xEF); /* loop filter off */ + SiS_SetCH70xxANDOR(SiS_Pr, 0x21, 0x01, 0xFE); /* ACIV on */ } #endif /* 300 */ @@ -9657,8 +9650,6 @@ SetDelayComp(struct SiS_Private *SiS_Pr, unsigned short ModeNo) delay = 0x0a; } else if(IS_SIS740) { delay = 0x00; - } else if(SiS_Pr->ChipType < SIS_330) { - delay = 0x0c; } else { delay = 0x0c; } |