summaryrefslogtreecommitdiff
path: root/drivers/staging/xgifb
AgeCommit message (Collapse)Author
2014-04-07Rewind v3.13-rc3+ (78fd82238d0e5716) to v3.12Scott Wood
2013-10-30Staging: xgifb: fix braces {} are not necessary for any arm of this statementEbru Akagunduz
Fix checkpatch.pl issues with braces {} are not necessary for any arm of this statement in vb_setmode.c Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-14Staging: xgifb: remove space before semicolonAshvini Varatharaj
Fix checkpatch warning: WARNING:space prohibited before semicolon Signed-off-by: Ashvini Varatharaj <ashvinivaratharaj@gmail.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-08Staging: xgifb: braces {} are not necessary for single statement in vb_setmodeEbru Akagunduz
Fix checkpatch.pl issues with braces {} are not necessary for single statement blocks in vb_setmode.c Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com> Reviewed-by: Josh Triplett <josh@joshtriplett.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-25staging: xgifb: Remove redundant pci_set_drvdataSachin Kamat
Driver core sets driver data to NULL upon failure or remove. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-12Staging: xgifb: Fixed a warning of Space before semicolonKumar Gaurav
Fixed issue by removing Space before semicolon Signed-off-by: Kumar Gaurav <kumargauravgupta3@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-23staging: xgifb: delete unused "pVBInfo" parametersAaro Koskinen
Delete unused "pVBInfo" parameters from internal functions. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-23staging: xgifb: delete unused "RefreshRateTableIndex" parametersAaro Koskinen
Delete unused "RefreshRateTableIndex" parameters from internal functions. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-23staging: xgifb: delete unused "HwDeviceExtension" parametersAaro Koskinen
Delete unused "HwDeviceExtension" parameters from internal functions. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-23staging: xgifb: delete unused "ModeIdIndex" parametersAaro Koskinen
Delete unused "ModeIdIndex" parameters from internal functions. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-23staging: xgifb: delete unused "ModeNo" parametersAaro Koskinen
Delete unused "ModeNo" parameters from internal functions. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-23staging: xgifb: delete unused "rateindex" parametersAaro Koskinen
Delete unused "rateindex" parameters from internal functions. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-30staging: xgifb: vb_setmode: delete IF_DEF_CRT2Monitor checksAaro Koskinen
Code checking for IF_DEF_CRT2Monitor is only executed for chips < XG20, and there IF_DEF_CRT2Monitor is always true, so the flag is redundant. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-30staging: xgifb: vb_setmode: delete IF_DEF_HiVision checksAaro Koskinen
Code checking for IF_DEF_HiVision is only executed for chips < XG20, and there IF_DEF_HiVision is always true, so the flag is redundant. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-30staging: xgifb: vb_setmode: delete IF_DEF_YPbPr checksAaro Koskinen
Code checking for IF_DEF_YPbPr is only executed for chips < XG20, and there IF_DEF_YPbPr is always true, so the flag is redundant. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-30staging: xgifb: delete redundant return statementsAaro Koskinen
Delete redundant return statements at the end of void functions. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-30staging: xgifb: XGI_DisableBridge(): delete redundant checksAaro Koskinen
Delete some redudant checks. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-30staging: xgifb: XGI_EnableChISLCD(): delete trivial functionAaro Koskinen
The function returns always false, delete it. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-30staging: xgifb: SetFlag: delete EnableChAAaro Koskinen
This flag is never set, so checks can be removed and code behind it deleted. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-30staging: xgifb: SetFlag: delete DisableChAAaro Koskinen
This flag is never set, so checks can be removed and code behind it deleted. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-30staging: xgifb: SetFlag: delete EnableChBAaro Koskinen
This flag is never set, so checks can be removed and code behind it deleted. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-30staging: xgifb: SetFlag: delete DisableChBAaro Koskinen
This flag is never set, so checks can be removed and code behind it deleted. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-30staging: xgifb: SetFlag: delete GatingCRTAaro Koskinen
This flag is never set, so checks can be removed and code behind it deleted. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-30staging: xgifb: XGI_SetCRT1VCLK(): avoid copy-pasteAaro Koskinen
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>
2013-05-30staging: xgifb: XGI_GetRatePtrCRT2(): delete IF_DEF_LVDS checkAaro Koskinen
IF_DEF_LVDS cannot be set if ProgrammingCRT2 flag is set, so remove the check to simplify the code. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-30staging: xgifb: XGI_AjustCRT2Rate(): delete IF_DEF_LVDS checkAaro Koskinen
IF_DEF_LVDS cannot be set when XGI_AjustCRT2Rate() is called, so we can remove the check and dead code. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-30staging: xgifb: call XGI_GetVBType from InitTo330PointerAaro Koskinen
Move XGI_GetVBType call inside InitTo330Pointer to avoid code duplication. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-30staging: xgifb: XGI_GetVBType(): delete IF_DEF_LVDS checkAaro Koskinen
XGI_GetVBType() is called only for chips < XG20 so IF_DEF_LVDS cannot be set. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-30staging: xgifb: refactor XGI_BridgeIsOn()Aaro Koskinen
Refactor XGI_BridgeIsOn(). IF_DEF_LVDS bit is not valid for < XG20 chips. Also we can make the function static by moving it to vb_init. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-17staging/xgifb: Remove dead assignments/incrementsPeter Huewe
The code now contains several dead assignments which are shadowed by another assignment a few lines later. -> This patch removes them (and possibly associated code). Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-16staging/xgifb: Fix always false condition in vb_setmode.c (smatch)Peter Huewe
Smatch complains: drivers/staging/xgifb/vb_setmode.c:3181 XGI_SetLockRegs() warn: bitwise AND condition is false here Since SetNTSCTV is defined as 0 in drivers/video/sis/initdef.h this is correct. -> Change the condition to == to fix this. Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-16staging/xgifb: Remove unnecessary binary calculation in GetXG27FPBitsPeter Huewe
If temp <= 2 no other bits than the lowest two (0x03) can be set anyway -> this operation can be removed. Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-16staging/xgifb: Consolidate function almost identical calls in ↵Peter Huewe
XGINew_GetXG21Sense Instead of calling xgifb_reg_and_or with almost identical parameters in a simple if/else scenario, we assign the changing parameter to a temp variable and call xgifb_reg_and_or only from one location. -> Easier to read, easier to understand (especially wrt the line breaks) (For the if condition we don't need the Temp variable, so we can use the value directly). Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-16staging/xgifb: Remove unnecessary cases in XGINew_SenseLCDPeter Huewe
The switch statement sets the temp value to zero for certain cases and leaves it untouched for other cases -> all these other cases can be combined in the default case. Since an empty case containing only a break, it can be removed. The patch also removes the if statement, as it uses the same value as the switch for comparison, and includes the code into the switch. Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-16staging/xgifb: Remove uneccessary/simply if in XGINew_GetXG20DRAMTypePeter Huewe
Instead of storing the value in a temp variable, anding it with 1 and assign data conditionally we can assign the value directly. Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-28staging: xgifb: rename SR15/SR13 arrays to SR18Aaro Koskinen
Since we are programming SR register 18, better name structs/arrays accordingly to avoid confusion. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-28staging: xgifb: make SR15/SR13 arrays single dimensionalAaro Koskinen
Since we only access the third row, we can delete the others. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-28staging: xgifb: XGINew_SetDRAMDefaultRegister340: inline the value of SR1BAaro Koskinen
SR1B register value is always 3 regardless of video card or RAM type. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-28staging: xgifb: delete pXGINew_DRAMTypeDefinitionAaro Koskinen
Delete unused struct field. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-28staging: xgifb: delete XGI330_LCDCapStruct.PWD_2xAaro Koskinen
Delete unused XGI330_LCDCapStruct fields. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-28staging: xgifb: delete XGI330_LCDCapStruct.PSC_SxAaro Koskinen
Delete unused XGI330_LCDCapStruct fields. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-28staging: xgifb: delete LCD_SetFlagAaro Koskinen
Delete redundant XGI330_LCDCapStruct field. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-28staging: xgifb: delete IF_DEF_TRUMPION and IF_DEF_DSTNAaro Koskinen
Delete some unused flags. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-28staging: xgifb: eliminate IF_DEF_LVDS checks from vb_initAaro Koskinen
Inside vb_init, IF_DEF_LVDS tells only if the vbios was succesfully read on XG21. Rearrange the code so that we don't need to set or care about this flag. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-28staging: xgifb: delete redundant IF_DEF_LVDS checkAaro Koskinen
IF_DEF_LVDS can be set only on XG21. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-02-15staging/xgifb: Remove duplicated code in loops.Peter Huewe
Instead of calling the same function three times in a loop, multiply the loop counter by three. And since the value in DAC_TEST_PARMS is always the same we can use the value directly. Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-02-15staging/xgifb: Consolidate return pathsPeter Huewe
Both branches of this if statement end in the same return statement. -> move the return to the bottom and get rid of the else statement. Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-02-15staging/xgifb: Remove code without effectPeter Huewe
The tempal variable is assigned and then immediately overwritten. -> remove everything without effect. The inb is kept for possible side effects. Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-02-15staging/xgifb: Remove unnecessary castsPeter Huewe
Both functions xgifb_reg_get and inb return an u8 value, so we don't need to cast their return value to unsigned char. -> remove the cast Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-02-15staging/xgifb: Consolidate if/else if with identical code branchesPeter Huewe
Both branches of this if statement execute the same code. Thus we can || them together and remove code duplication Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>