1
0
Fork 0
Commit Graph

386 Commits (redonkable)

Author SHA1 Message Date
Huacai Chen 69cf5ab217 staging: sm750fb: Fix parameter mistake in poke32
commit 16808dcf60 upstream.

In commit c075b6f2d3 ("staging: sm750fb: Replace POKE32 and PEEK32
by inline functions"), POKE32 has been replaced by the inline function
poke32. But it exchange the "addr" and "data" parameters by mistake, so
fix it.

Fixes: c075b6f2d3 ("staging: sm750fb: Replace POKE32 and PEEK32 by inline functions"),
Signed-off-by: Huacai Chen <chenhc@lemote.com>
Signed-off-by: Liangliang Huang <huangll@lemote.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-21 09:49:24 +01:00
Greg Kroah-Hartman b24413180f License cleanup: add SPDX GPL-2.0 license identifier to files with no license
Many source files in the tree are missing licensing information, which
makes it harder for compliance tools to determine the correct license.

By default all files without license information are under the default
license of the kernel, which is GPL version 2.

Update the files which contain no license information with the 'GPL-2.0'
SPDX license identifier.  The SPDX identifier is a legally binding
shorthand, which can be used instead of the full boiler plate text.

This patch is based on work done by Thomas Gleixner and Kate Stewart and
Philippe Ombredanne.

How this work was done:

Patches were generated and checked against linux-4.14-rc6 for a subset of
the use cases:
 - file had no licensing information it it.
 - file was a */uapi/* one with no licensing information in it,
 - file was a */uapi/* one with existing licensing information,

Further patches will be generated in subsequent months to fix up cases
where non-standard license headers were used, and references to license
had to be inferred by heuristics based on keywords.

The analysis to determine which SPDX License Identifier to be applied to
a file was done in a spreadsheet of side by side results from of the
output of two independent scanners (ScanCode & Windriver) producing SPDX
tag:value files created by Philippe Ombredanne.  Philippe prepared the
base worksheet, and did an initial spot review of a few 1000 files.

The 4.13 kernel was the starting point of the analysis with 60,537 files
assessed.  Kate Stewart did a file by file comparison of the scanner
results in the spreadsheet to determine which SPDX license identifier(s)
to be applied to the file. She confirmed any determination that was not
immediately clear with lawyers working with the Linux Foundation.

Criteria used to select files for SPDX license identifier tagging was:
 - Files considered eligible had to be source code files.
 - Make and config files were included as candidates if they contained >5
   lines of source
 - File already had some variant of a license header in it (even if <5
   lines).

All documentation files were explicitly excluded.

The following heuristics were used to determine which SPDX license
identifiers to apply.

 - when both scanners couldn't find any license traces, file was
   considered to have no license information in it, and the top level
   COPYING file license applied.

   For non */uapi/* files that summary was:

   SPDX license identifier                            # files
   ---------------------------------------------------|-------
   GPL-2.0                                              11139

   and resulted in the first patch in this series.

   If that file was a */uapi/* path one, it was "GPL-2.0 WITH
   Linux-syscall-note" otherwise it was "GPL-2.0".  Results of that was:

   SPDX license identifier                            # files
   ---------------------------------------------------|-------
   GPL-2.0 WITH Linux-syscall-note                        930

   and resulted in the second patch in this series.

 - if a file had some form of licensing information in it, and was one
   of the */uapi/* ones, it was denoted with the Linux-syscall-note if
   any GPL family license was found in the file or had no licensing in
   it (per prior point).  Results summary:

   SPDX license identifier                            # files
   ---------------------------------------------------|------
   GPL-2.0 WITH Linux-syscall-note                       270
   GPL-2.0+ WITH Linux-syscall-note                      169
   ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause)    21
   ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)    17
   LGPL-2.1+ WITH Linux-syscall-note                      15
   GPL-1.0+ WITH Linux-syscall-note                       14
   ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause)    5
   LGPL-2.0+ WITH Linux-syscall-note                       4
   LGPL-2.1 WITH Linux-syscall-note                        3
   ((GPL-2.0 WITH Linux-syscall-note) OR MIT)              3
   ((GPL-2.0 WITH Linux-syscall-note) AND MIT)             1

   and that resulted in the third patch in this series.

 - when the two scanners agreed on the detected license(s), that became
   the concluded license(s).

 - when there was disagreement between the two scanners (one detected a
   license but the other didn't, or they both detected different
   licenses) a manual inspection of the file occurred.

 - In most cases a manual inspection of the information in the file
   resulted in a clear resolution of the license that should apply (and
   which scanner probably needed to revisit its heuristics).

 - When it was not immediately clear, the license identifier was
   confirmed with lawyers working with the Linux Foundation.

 - If there was any question as to the appropriate license identifier,
   the file was flagged for further research and to be revisited later
   in time.

In total, over 70 hours of logged manual review was done on the
spreadsheet to determine the SPDX license identifiers to apply to the
source files by Kate, Philippe, Thomas and, in some cases, confirmation
by lawyers working with the Linux Foundation.

Kate also obtained a third independent scan of the 4.13 code base from
FOSSology, and compared selected files where the other two scanners
disagreed against that SPDX file, to see if there was new insights.  The
Windriver scanner is based on an older version of FOSSology in part, so
they are related.

Thomas did random spot checks in about 500 files from the spreadsheets
for the uapi headers and agreed with SPDX license identifier in the
files he inspected. For the non-uapi files Thomas did random spot checks
in about 15000 files.

In initial set of patches against 4.14-rc6, 3 files were found to have
copy/paste license identifier errors, and have been fixed to reflect the
correct identifier.

Additionally Philippe spent 10 hours this week doing a detailed manual
inspection and review of the 12,461 patched files from the initial patch
version early this week with:
 - a full scancode scan run, collecting the matched texts, detected
   license ids and scores
 - reviewing anything where there was a license detected (about 500+
   files) to ensure that the applied SPDX license was correct
 - reviewing anything where there was no detection but the patch license
   was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied
   SPDX license was correct

This produced a worksheet with 20 files needing minor correction.  This
worksheet was then exported into 3 different .csv files for the
different types of files to be modified.

These .csv files were then reviewed by Greg.  Thomas wrote a script to
parse the csv files and add the proper SPDX tag to the file, in the
format that the file expected.  This script was further refined by Greg
based on the output to detect more types of files automatically and to
distinguish between header and source .c files (which need different
comment types.)  Finally Greg ran the script using the .csv files to
generate the patches.

Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org>
Reviewed-by: Philippe Ombredanne <pombredanne@nexb.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-02 11:10:55 +01:00
Teddy Wang 740c433ec3 staging: sm750fb: avoid conflicting vesafb
If vesafb is enabled in the config then /dev/fb0 is created by vesa
and this sm750 driver gets fb1, fb2. But we need to be fb0 and fb1 to
effectively work with xorg.
So if it has been alloted fb1, then try to remove the other fb0.

In the previous send, why #ifdef is used was asked.
https://lkml.org/lkml/2017/6/25/57

Answered at: https://lkml.org/lkml/2017/6/25/69
Also pasting here for reference.

'Did a quick research into "why".
The patch d8801e4df9 ("x86/PCI: Set IORESOURCE_ROM_SHADOW only for the
default VGA device") has started setting IORESOURCE_ROM_SHADOW in flags
for a default VGA device and that is being done only for x86.
And so, we will need that #ifdef to check IORESOURCE_ROM_SHADOW as that
needs to be checked only for a x86 and not for other arch.'

Cc: <stable@vger.kernel.org> # v4.4+
Signed-off-by: Teddy Wang <teddy.wang@siliconmotion.com>
Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-07-18 08:53:45 +02:00
Lynn Lei 677e6a1ab4 staging: sm750fb: fixed a assignment typo
fixed a typo issue in get_mxclk_freq() function.

the original code using PLL_CTRL_M_SHIFT for shifting to set N flag.
which is not right, it should be PLL_CTRL_N_SHIFT.

both PLL_CTRL_M_SHIFT and PLL_CTRL_N_SHIFT
  defined in drivers/staging/sm750fb/ddk750_reg.h

Signed-off-by: Lynn Lei <lynnl.wit@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-07-16 09:13:53 +02:00
Dhananjay Balan 97af1ce278 drivers: staging: sm750: Hold lock irrespective of fb numbers.
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 <mail@dbalan.in>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-29 16:38:50 +02:00
Derek Robson 3fa4b5e58e staging: sm750fb - add parameter names
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 <robsonde@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-25 16:31:21 +02:00
Sudip Mukherjee 888db9a6e0 staging: sm750fb: change default screen resolution
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 <sudipm.mukherjee@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-23 19:36:49 +02:00
Sudip Mukherjee ac66925108 staging: sm750fb: change default screen resolution
Update the default screen resolution and also use 24bpp for a better
screen performance.

Tested-by: Teddy Wang <teddy.wang@siliconmotion.com>
Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-06-06 16:16:10 +02:00
Matej Dujava c975045656 staging: sm750fb: fix length of lines, function calls and declaration
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 <mdujava@kocurkovo.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-05-18 15:57:25 +02:00
Prasant Jalan 271dbae3c6 staging: sm750fb: removed line continuations in quoted strings
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-08 17:00:52 +02:00
Prasant Jalan 4895398d03 staging: sm750fb: fixing function return with lock held
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-08 17:00:51 +02:00
Andrea della Porta d6171ba858 staging: sm750fb: ddk750_display.c - fixed checkpatch warning: line over 80 chars
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-04-08 17:00:51 +02:00
Arushi Singhal ff49304b5b staging: sm750fb: Remove typedef from "typedef enum _spolarity_t"
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-23 14:23:19 +01:00
Arushi Singhal bf76023131 staging: sm750fb: Remove typedef from "typedef struct _mode_parameter_t"
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-23 14:23:19 +01:00
Arushi Singhal 7369e062fd staging:sm750fb: Code readability is improved.
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-21 08:45:30 +01:00
Tahia Khan 01f23a1dc0 staging: sm750fb: Removes unused variable from sm750_hw_copyarea
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-16 11:48:59 +09:00
Arushi Singhal 4cd3096dfd staging: sm750fb: Alignment should match open parenthesis
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-14 07:57:53 +08:00
Arushi Singhal 23b6fc73ce staging: sm750fb: fixes add blank line after function/struct/union/enum declarations
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-14 07:57:53 +08:00
Arushi Singhal d228cf8744 staging: sm750fb: function prototype argument should have an identifier name
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-14 07:57:53 +08:00
Varsha Rao 4e1c89dec8 staging: sm750fb: Removed unnecessary parentheses.
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-09 19:06:36 +01:00
Varsha Rao 4529d8914e staging: sm750fb: Remove blank lines after { and before } braces.
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-06 09:17:06 +01:00
Varsha Rao a4ce938653 staging: sm750fb: Replace NULL comparison.
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-06 09:17:06 +01:00
Varsha Rao dca633d49c staging: sm750fb: Added spaces around arithmetic operators.
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-06 09:17:06 +01:00
Varsha Rao 4e7f31c0d4 staging: sm750fb: Remove unnecessary blank lines.
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-06 09:17:06 +01:00
Varsha Rao 47c565ea8d staging: sm750fb: Add identifier to function definition argument.
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-06 09:17:06 +01:00
Varsha Rao 8726d48863 staging: sm750fb: Fix line over 80 characters.
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-06 09:17:06 +01:00
Varsha Rao f0588efb5a staging: sm750fb: Add braces around if statement.
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-06 09:17:05 +01:00
Katie Dunne 3efc661670 staging: sm750fb: add spaces around operators
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-06 09:17:02 +01:00
Katie Dunne 144634a6b4 staging: sm750fb: add curly braces to if-statements
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-03-06 09:17:02 +01:00
Derek Robson e6b240bd3b Staging: sm750fb: sm750.c - style fix
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-12 13:22:08 +01:00
Matthieu Simon c075b6f2d3 staging: sm750fb: Replace POKE32 and PEEK32 by inline functions
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-02-09 13:23:13 +01:00
Scott Matheina 1dfcda6fe7 staging:sm750fb:ddk750_chip.c removes un-necessary blank lines
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-10 17:40:15 +01:00
Scott Matheina 87f0f086c6 staging:sm750fb:ddk750_chip.c Adds braces to last arm of statement
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-10 17:40:15 +01:00
Abdul Rauf cee9ba1c30 staging: sm750fb: fix checkpatch 80 characters warning
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-10 17:40:15 +01:00
Abdul Rauf c7c5722d16 staging: sm750fb: fix checkpatch multiple blank lines check
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>
2017-01-10 17:40:14 +01:00
Andrea Ghittino f1706cb74e staging: sm750fb: fix tabstop style warning
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-30 12:59:53 +01:00
Dan Carpenter d28fb1ffba staging: sm750fb: fix a type issue in sm750_set_chip_type()
"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 <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-29 21:57:14 +01:00
Sudip Mukherjee 4e0447cdaf staging: sm750fb: update license
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-29 21:57:14 +01:00
Greg Kroah-Hartman ce0347c2b0 Merge 4.9-rc5 into staging-next
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-14 08:53:56 +01:00
Arnd Bergmann 52d0744d75 staging: sm750fb: prefix global identifiers
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 <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-10 13:55:03 +01:00
Elise Lennion c56de0967a staging: sm750fb: Replace pr_*() with dev_*().
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-07 11:31:12 +01:00
Huacai Chen 33c027ae3c staging: sm750fb: Fix bugs introduced by early commits
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 <chenhc@lemote.com>
Cc: stable <stable@vger.kernel.org> # 4.6+
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-07 10:27:40 +01:00
Elise Lennion c2b6028fd1 staging: sm750fb: Shorten local variables names.
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-30 11:13:11 -04:00
Elise Lennion 03140dabf5 staging: sm750fb: Replace functions CamelCase naming with underscores.
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-30 11:13:11 -04:00
Elise Lennion cefc2fc61e staging: sm750fb: Refine code in set_current_gate().
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-30 11:13:11 -04:00
Elise Lennion 57499d136e staging: sm750fb: Refine the code and remove unused code.
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-27 15:19:37 +02:00
Eric S. Stone f5016082f6 staging: sm750fb: restructure multi-line comments to follow CodingStyle
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-25 10:56:17 +02:00
Elise Lennion 6aab2d7eac staging: sm750fb: Add const qualifier to struct declaration.
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-17 09:46:58 +02:00
Elise Lennion aa1eecdc49 staging: sm750fb: Remove unnecessary comments.
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-16 10:27:37 +02:00
Elise Lennion 3fcb465f1e staging: sm750fb: Replace functions CamelCase naming with underscores.
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-16 10:27:36 +02:00