diff options
author | Aaro Koskinen <aaro.koskinen@iki.fi> | 2013-05-29 23:59:05 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-05-30 20:55:49 +0900 |
commit | b750f51661695b627c2ccc141913d64268fe8b38 (patch) | |
tree | a10c4ce963ef78465541e673292f27b8f84d8a41 /drivers/staging/xgifb | |
parent | b0b4a8a126db9317b6e701af334ff114a224a9d6 (diff) | |
download | linux-stable-b750f51661695b627c2ccc141913d64268fe8b38.tar.gz linux-stable-b750f51661695b627c2ccc141913d64268fe8b38.tar.bz2 linux-stable-b750f51661695b627c2ccc141913d64268fe8b38.zip |
staging: xgifb: XGI_SetCRT1VCLK(): avoid copy-paste
Avoid copy-pasted code in if branches by rearranging the checks.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/xgifb')
-rw-r--r-- | drivers/staging/xgifb/vb_setmode.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/drivers/staging/xgifb/vb_setmode.c b/drivers/staging/xgifb/vb_setmode.c index fa85ab1b75ef..69b6a960888d 100644 --- a/drivers/staging/xgifb/vb_setmode.c +++ b/drivers/staging/xgifb/vb_setmode.c @@ -895,16 +895,10 @@ static void XGI_SetCRT1VCLK(unsigned short ModeNo, unsigned char index, data; unsigned short vclkindex; - if (pVBInfo->IF_DEF_LVDS == 1) { - index = XGI330_RefIndex[RefreshRateTableIndex].Ext_CRTVCLK; - data = xgifb_reg_get(pVBInfo->P3c4, 0x31) & 0xCF; - xgifb_reg_set(pVBInfo->P3c4, 0x31, data); - xgifb_reg_set(pVBInfo->P3c4, 0x2B, XGI_VCLKData[index].SR2B); - xgifb_reg_set(pVBInfo->P3c4, 0x2C, XGI_VCLKData[index].SR2C); - xgifb_reg_set(pVBInfo->P3c4, 0x2D, 0x01); - } else if ((pVBInfo->VBType & (VB_SIS301B | VB_SIS302B | VB_SIS301LV - | VB_SIS302LV | VB_XGI301C)) && (pVBInfo->VBInfo - & XGI_SetCRT2ToLCDA)) { + if ((pVBInfo->IF_DEF_LVDS == 0) && + (pVBInfo->VBType & (VB_SIS301B | VB_SIS302B | VB_SIS301LV | + VB_SIS302LV | VB_XGI301C)) && + (pVBInfo->VBInfo & XGI_SetCRT2ToLCDA)) { vclkindex = XGI_GetVCLK2Ptr(ModeNo, ModeIdIndex, RefreshRateTableIndex, HwDeviceExtension, pVBInfo); |