Start holding the lock for all cases irrespective of number of fb,
there could be a deadlock since this number could change in the
lifetime of this lock
Signed-off-by: Dhananjay Balan <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Fixed checkpatch.pl warnings of the form "function definition argument
'foo' should also have an identifier name" in header files.
Signed-off-by: Derek Robson <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
The previous patch which updated screen resolution was tested under
wrong environment. sm750 driver does not support 24bpp. It only
supports 8bpp, 16bpp and 32bpp.
Lets update the default screen resolution to use 32bpp for a better
screen performance.
Fixes: ac66925108 ("staging: sm750fb: change default screen resolution")
Signed-off-by: Sudip Mukherjee <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Update the default screen resolution and also use 24bpp for a better
screen performance.
Tested-by: Teddy Wang <[email protected]>
Signed-off-by: Sudip Mukherjee <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This patch breaks lines that are longer than 80 characters and joins
together those, that are too short and can be placed at one.
Function calls and declarations are updated to fit kernel code style.
Signed-off-by: Matej Dujava <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
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 <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
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 <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
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 <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
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 <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
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 <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
New variables are added to make the code more readable.
Signed-off-by: Arushi Singhal <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
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 <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
function prototype arguments like 'struct vb_device_info *','unsigned
long' etc. should have an identifier name.
Signed-off-by: Arushi Singhal <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
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 <[email protected]>
Acked-by: Julia Lawall <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
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 <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
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 <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
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 <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
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 <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Line over 80 characters are split to fix the following checkpatch issue:
WARNING: line over 80 characters
Signed-off-by: Varsha Rao <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
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 <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Add spaces around operators -, *, ?:, >>, << to conform to kernel style.
These instances were found with checkpatch.pl
Signed-off-by: Katie Dunne <[email protected]>
Acked-by: Julia Lawall <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Add curly braces to if-statements for style compliance.
These cases are found by checkpatch.pl
Signed-off-by: Katie Dunne <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
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 <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Fixes absence of braces on last arm of statement, identified by
checkpatch
Signed-off-by: Scott Matheina <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Fix the following warnings:
line over 80 characters
Signed-off-by: Abdul Rauf <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Fix the following checks:
Please don't use multiple blank lines
Signed-off-by: Abdul Rauf <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
"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: 81dee67e21 ("staging: sm750fb: add sm750 to staging")
Signed-off-by: Dan Carpenter <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
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 <[email protected]>
Cc: gzhou1 <[email protected]>
Signed-off-by: Sudip Mukherjee <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
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: 03140dabf5 ("staging: sm750fb: Replace functions CamelCase naming with underscores.")
Signed-off-by: Arnd Bergmann <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
dev_*() functions print identifying information about the struct device
and should be used instead of pr_*() whenever possible.
Signed-off-by: Elise Lennion <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Early commit 30ca5cb63c ("staging: sm750fb: change definition of
PANEL_PLANE_TL fields") and 27b047bbe1 ("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 <[email protected]>
Cc: stable <[email protected]> # 4.6+
Signed-off-by: Greg Kroah-Hartman <[email protected]>
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 <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Replace CamelCase function names with underscores to comply with
the standard kernel coding style.
Signed-off-by: Elise Lennion <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
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 <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
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 <[email protected]>
Reviewed-by: Dan Carpenter <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Eliminates all checkpatch.pl BLOCK_COMMENT_STYLE warnings in
sm750fb, and coincidentally eliminates some line-length (80)
warnings.
Signed-off-by: Eric S. Stone <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Const qualifier added to struct declaration to avoid data overwrite
during runtime and improve security.
Signed-off-by: Elise Lennion <[email protected]>
Acked-by: Julia Lawall <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Remove function comments that only restate the function name.
Signed-off-by: Elise Lennion <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Replace CamelCase function names with underscores to comply with
the standard kernel coding style.
Signed-off-by: Elise Lennion <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
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 <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
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 <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
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 <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>