aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/sm750fb (follow)
AgeCommit message (Collapse)AuthorFilesLines
2017-04-08staging: sm750fb: removed line continuations in quoted stringsPrasant Jalan1-9/+9
checkpatch gives WARNING: Avoid line continuations in quoted strings. Trivial fix by removing line continuations and adding another quote at the start of next line. Signed-off-by: Prasant Jalan <prasant.jalan@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-08staging: sm750fb: fixing function return with lock heldPrasant Jalan1-4/+8
lynxfb_suspend() & lynxfb_resume() return on errors while holding console_lock. Adding 'goto' such that proper cleanups can be done before returning from function and therefore console_lock can be released before returning. Signed-off-by: Prasant Jalan <prasant.jalan@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-04-08staging: sm750fb: ddk750_display.c - fixed checkpatch warning: line over 80 charsAndrea della Porta1-1/+2
staging: sm750fb: ddk750_display.c - fixed the following checkpatch warning: WARNING: line over 80 characters #149: FILE: drivers/staging/sm750fb/ddk750_display.c:149: + swPanelPowerSequence((output & PNL_SEQ_MASK) >> PNL_SEQ_OFFSET, 4); Signed-off-by: Andrea della Porta <sfaragnaus@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-23staging: sm750fb: Remove typedef from "typedef enum _spolarity_t"Arushi Singhal1-6/+5
This patch removes typedefs from enum and renames it from "typedef enum _spolarity_t" to "enum spolarity" as per kernel coding standards." Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-23staging: sm750fb: Remove typedef from "typedef struct _mode_parameter_t"Arushi Singhal3-9/+9
This patch removes typedefs from struct and renames it from "typedef struct _mode_parameter_t" to "struct mode_parameter" as per kernel coding standards." Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-21staging:sm750fb: Code readability is improved.Arushi Singhal1-25/+30
New variables are added to make the code more readable. Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-16staging: sm750fb: Removes unused variable from sm750_hw_copyareaTahia Khan1-3/+0
Removes unused variable opSign from sm750_hw_copyarea. Identified using coccinelle script 'unused.cocci'. Signed-off-by: Tahia Khan <tahia.khan@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-14staging: sm750fb: Alignment should match open parenthesisArushi Singhal1-40/+39
Fix checkpatch issues: "CHECK: Alignment should match open parenthesis". Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-14staging: sm750fb: fixes add blank line after function/struct/union/enum declarationsArushi Singhal1-0/+3
This patch fixes the warnings reported by checkpatch.pl for please use a blank line after function/struct/union/enum declarations. Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-14staging: sm750fb: function prototype argument should have an identifier nameArushi Singhal4-5/+5
function prototype arguments like 'struct vb_device_info *','unsigned long' etc. should have an identifier name. Signed-off-by: Arushi Singhal <arushisinghal19971997@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-09staging: sm750fb: Removed unnecessary parentheses.Varsha Rao4-5/+5
Removed parentheses on the right hand side of assignment, as they are not required. The following coccinelle script was used to fix this issue: @@ local idexpression id; expression e; @@ id = -( e -) Signed-off-by: Varsha Rao <rvarsha016@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06staging: sm750fb: Remove blank lines after { and before } braces.Varsha Rao3-9/+0
Removed unnecessary blank lines after open brace and before closed braces, to fix the check patch issue. Also removed braces which were not required. Signed-off-by: Varsha Rao <rvarsha016@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06staging: sm750fb: Replace NULL comparison.Varsha Rao1-1/+1
Replaced NULL comparison with pCurrentDviCtrl->pfnInit. This patch fixes the following checkpatch issue: CHECK: Comparison to NULL could be written "pCurrentDviCtrl->pfnInit" Signed-off-by: Varsha Rao <rvarsha016@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06staging: sm750fb: Added spaces around arithmetic operators.Varsha Rao2-2/+2
Added spaces around arithmetic operators (/, *), to fix the checkpatch issue. Signed-off-by: Varsha Rao <rvarsha016@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06staging: sm750fb: Remove unnecessary blank lines.Varsha Rao7-26/+0
Removed multiple blank lines, which are not required. This patch fixes the following check patch issues: CHECK: Please don't use multiple blank lines Signed-off-by: Varsha Rao <rvarsha016@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06staging: sm750fb: Add identifier to function definition argument.Varsha Rao1-1/+1
Added pinit_param as the identifier to function definition argument struct initchip_param and this patch fixes the checkpatch issue. Signed-off-by: Varsha Rao <rvarsha016@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06staging: sm750fb: Fix line over 80 characters.Varsha Rao1-5/+5
Line over 80 characters are split to fix the following checkpatch issue: WARNING: line over 80 characters Signed-off-by: Varsha Rao <rvarsha016@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06staging: sm750fb: Add braces around if statement.Varsha Rao1-2/+2
Added braces around if statement. This patch fixes the following checkpatch issue: CHECK: braces {} should be used on all arms of this statement Signed-off-by: Varsha Rao <rvarsha016@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06staging: sm750fb: add spaces around operatorsKatie Dunne1-5/+5
Add spaces around operators -, *, ?:, >>, << to conform to kernel style. These instances were found with checkpatch.pl Signed-off-by: Katie Dunne <kdunne@mail.ccsf.edu> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-03-06staging: sm750fb: add curly braces to if-statementsKatie Dunne1-13/+13
Add curly braces to if-statements for style compliance. These cases are found by checkpatch.pl Signed-off-by: Katie Dunne <kdunne@mail.ccsf.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-12Staging: sm750fb: sm750.c - style fixDerek Robson1-1/+1
Change permissions to octal style. Found using checkpatch Signed-off-by: Derek Robson <robsonde@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-02-09staging: sm750fb: Replace POKE32 and PEEK32 by inline functionsMatthieu Simon10-173/+180
POKE32 and PEEK32 have been replaced by inlined functions poke32 and peek32. Having inline functions instead of macros help to get the correct type-checking and avoid the possible precedence issues reported by checkpatch. Signed-off-by: Matthieu Simon <gmatthsim@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-01-10staging:sm750fb:ddk750_chip.c removes un-necessary blank linesScott Matheina1-3/+0
Fixes checkpatch warning - Please don't use multiple blank lines Signed-off-by: Scott Matheina <scott@matheina.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-01-10staging:sm750fb:ddk750_chip.c Adds braces to last arm of statementScott Matheina1-1/+2
Fixes absence of braces on last arm of statement, identified by checkpatch Signed-off-by: Scott Matheina <scott@matheina.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-01-10staging: sm750fb: fix checkpatch 80 characters warningAbdul Rauf1-2/+4
Fix the following warnings: line over 80 characters Signed-off-by: Abdul Rauf <abdulraufmujahid@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-01-10staging: sm750fb: fix checkpatch multiple blank lines checkAbdul Rauf1-1/+0
Fix the following checks: Please don't use multiple blank lines Signed-off-by: Abdul Rauf <abdulraufmujahid@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-30staging: sm750fb: fix tabstop style warningAndrea Ghittino1-1/+1
Fixes sm750fb tabstop style warning found by checkpatch.pl tool Signed-off-by: Andrea Ghittino <aghittino@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-29staging: sm750fb: fix a type issue in sm750_set_chip_type()Dan Carpenter2-2/+2
"revId" needs to be unsigned because we use it to test: if (revId == SM750LE_REVISION_ID) { and SM750LE_REVISION_ID is ((unsigned char )0xfe). Fixes: 81dee67e215b ("staging: sm750fb: add sm750 to staging") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-29staging: sm750fb: update licenseSudip Mukherjee1-1/+1
The driver was actually released with BSD license. It also gained GPL when it was submitted to be included in the kernel. Cc: Teddy Wang <teddy.wang@siliconmotion.com> Cc: gzhou1 <guojian.zhou@windriver.com> Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-14Merge 4.9-rc5 into staging-nextGreg Kroah-Hartman1-4/+4
We want the staging/iio fixes in here as well to resolve issues and merge problems. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-10staging: sm750fb: prefix global identifiersArnd Bergmann13-73/+73
Renaming some symbols inside this driver caused a conflict with an existing function, which in turn results in a link error: drivers/staging/sm750fb/sm750fb.o: In function `enable_dma': ddk750_hwi2c.c:(.text.enable_dma+0x0): multiple definition of `enable_dma' This adds a sm750_ prefix to each global symbol in the sm750fb driver that does not already have one. I manually looked for the symbols and then converted the driver using for i in calc_pll_value format_pll_reg set_power_mode set_current_gate \ enable_2d_engine enable_dma enable_gpio enable_i2c hw_set2dformat \ hw_de_init hw_fillrect hw_copyarea hw_imageblit hw_cursor_enable \ hw_cursor_disable hw_cursor_setSize hw_cursor_setPos \ hw_cursor_setColor hw_cursor_setData hw_cursor_setData2 ; do sed -i "s:\<$i\>:sm750_$i:" drivers/staging/sm750fb/*.[ch] done Fixes: 03140dabf584 ("staging: sm750fb: Replace functions CamelCase naming with underscores.") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-07staging: sm750fb: Replace pr_*() with dev_*().Elise Lennion1-6/+6
dev_*() functions print identifying information about the struct device and should be used instead of pr_*() whenever possible. Signed-off-by: Elise Lennion <elise.lennion@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-07staging: sm750fb: Fix bugs introduced by early commitsHuacai Chen1-4/+4
Early commit 30ca5cb63c56965 ("staging: sm750fb: change definition of PANEL_PLANE_TL fields") and 27b047bbe1ee9c0 ("staging: sm750fb: change definition of PANEL_PLANE_BR fields") modify the register bit fields definitions. But the modifications are wrong, because the bit mask of "bit field 10:0" is not 0xeff, but 0x7ff. The wrong definition bugs makes display very strange. Signed-off-by: Huacai Chen <chenhc@lemote.com> Cc: stable <stable@vger.kernel.org> # 4.6+ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-30staging: sm750fb: Shorten local variables names.Elise Lennion1-13/+13
Shorter names are preferred by C variables naming convention, they are easier to write and aren't more difficult to understand. Signed-off-by: Elise Lennion <elise.lennion@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-30staging: sm750fb: Replace functions CamelCase naming with underscores.Elise Lennion7-19/+19
Replace CamelCase function names with underscores to comply with the standard kernel coding style. Signed-off-by: Elise Lennion <elise.lennion@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-30staging: sm750fb: Refine code in set_current_gate().Elise Lennion1-20/+4
The 'switch' statement in set_current_gate() had only two possible scenarios, so it was replaced with an 'if' statement to make the code shorter and easier to understand. Signed-off-by: Elise Lennion <elise.lennion@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-27staging: sm750fb: Refine the code and remove unused code.Elise Lennion1-50/+21
Every call to the function waitNextVerticalSync() used the macro primaryWaitVerticalSync(), so the macro was removed and the function waitNextVerticalSync() renamed to primary_wait_vertical_sync(). With this change, an unnecessary 'if' statement was removed together with the lines within the 'else' statement, because it was never satisfied. The modified function was refined to better match the Kernel coding style. Signed-off-by: Elise Lennion <elise.lennion@gmail.com> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-25staging: sm750fb: restructure multi-line comments to follow CodingStyleEric S. Stone12-127/+184
Eliminates all checkpatch.pl BLOCK_COMMENT_STYLE warnings in sm750fb, and coincidentally eliminates some line-length (80) warnings. Signed-off-by: Eric S. Stone <esstone@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-17staging: sm750fb: Add const qualifier to struct declaration.Elise Lennion1-1/+1
Const qualifier added to struct declaration to avoid data overwrite during runtime and improve security. Signed-off-by: Elise Lennion <elise.lennion@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16staging: sm750fb: Remove unnecessary comments.Elise Lennion1-8/+0
Remove function comments that only restate the function name. Signed-off-by: Elise Lennion <elise.lennion@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16staging: sm750fb: Replace functions CamelCase naming with underscores.Elise Lennion6-36/+36
Replace CamelCase function names with underscores to comply with the standard kernel coding style. Signed-off-by: Elise Lennion <elise.lennion@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16staging: sm750fb: compress return logicElizabeth Ferdman1-3/+1
Using Coccinelle script, compress return logic to return a value directly rather than doing an assignment and returning the variable. Remove unnecessary variable declaration by hand. Coccinelle script: @@ local idexpression ret; expression e; @@ -ret = +return e; -return ret; Signed-off-by: Elizabeth Ferdman <gnudevliz@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16staging: sm750fb: Merge ddk750_help.* into ddk750_chip.*.Elise Lennion13-60/+30
The file ddk750_help.c contained only one function declaration, so it was merged into ddk750_chip.c to simplify the driver. Also, ddk750_help.h was merged into ddk750_chip.h to keep consistency. With these changes a few global variables are removed and the function ddk750_set_mmio is rewritten, so its purpose in the code is clearer. Signed-off-by: Elise Lennion <elise.lennion@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16staging: sm750fb: Replace printk() with pr_info().Elise Lennion1-1/+1
Fix checkpatch warning: WARNING: printk() should include KERN_ facility level New checkpatch warning appears after including KERN_ facility level. Fix checkpatch warning: WARNING: Prefer [subsystem eg: netdev]_info([subsystem]dev, ... then dev_info(dev, ... then pr_info(... to printk(KERN_INFO ... Signed-off-by: Elise Lennion <elise.lennion@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16Staging: sm750fb: use unsigned int instead unsignedMuraru Mihaela1-5/+5
This patch fixes a WARNING: Prefer 'unsigned int' to bare use of 'unsigned', found by checkpatch.pl. By fixing this the types of the parameters of the function become more explicit. Signed-off-by: Muraru Mihaela <mihaela.muraru21@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-16Staging: sm750fb: fix do not add new typedefs warningMihaela Muraru4-16/+15
This patch fixes the checkpatch.pl warning: "WARNING: do not add new typedefs". Hiding a variables of type 'struct' is not always a good idea,because when we passing them as parameters we tempt to forget that in this proces we work with stack memory and allocatting struct on stack is something that we should manage carefuly. It is also delete the '_t' from the name of the structs and treat a line over 80 character issue in ddk750_mode.c, that appear after my modification. Signed-off-by: Mihaela Muraru <mihaela.muraru21@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-02staging: sm750fb: replace roundedDiv with DIV_ROUND_CLOSESTMoshe Green1-4/+2
Replace local implementation of rounded division (roundedDiv macro) with the in-kernel implementation (DIV_ROUND_CLOSEST macro) in ddk750_chip.c Signed-off-by: Moshe Green <mgmoshes@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-10-02staging: sm750fb: conform to block comment styleElizabeth Ferdman7-101/+113
Fix 2 checkpatch errors: -Block comments use * on subsequent lines, -Block comments use a trailing */ on a separate line to conform to block commenting style. Signed-off-by: Elizabeth Ferdman <gnudevliz@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-27staging: sm750fb: rename getChipType to sm750_get_chip_typeMoshe Green6-19/+19
Rename CamelCased function getChipType to sm750_get_chip_type (prefex with sm750 in order to make the context of the function clear). This issue was found by checkpatch.pl Signed-off-by: Moshe Green <mgmoshes@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-09-22staging: sm750fb: Remove unnecessary parenthesesRehas Sachdeva1-2/+2
Remove unnecessary parentheses from right side of an assignment. Issue detected by the following Coccinelle semantic patch: @r@ identifier x; expression e1, e2; @@ - x = (e1 << e2); + x = e1 << e2; Signed-off-by: Rehas Sachdeva <aquannie@gmail.com> Acked-by: Julia Lawall <julia.lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>