summaryrefslogtreecommitdiffstats
path: root/drivers/staging/sm750fb/sm750.c
AgeCommit message (Collapse)AuthorFilesLines
2015-10-27staging: sm750fb: merge sm750_hw.h into sm750.hMike Rapoport1-1/+0
There is no actual need to split type definitions and global function declarations between lots of small headers. Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27staging: sm750fb: remove unused smi_indent variableMike Rapoport1-2/+0
The smi_indent variable is only declared, but never used. Remove it. Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27staging: sm750fb: replace PADDING macro with ALIGNMike Rapoport1-4/+4
The custom macro PADDING differs from standard kernel ALIGN only in parameters order. Replace PADDING with ALIGN and remove it's definition. Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27staging: sm750fb: replace lynx_cursor methods with function callsMike Rapoport1-20/+14
The methods in lynx_cursor always use the same implementation and there is no point to use redirection rather than direct function call. Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24staging: sm750fb: use direct call to hw_sm750_output_setModeMike Rapoport1-3/+1
The proc_setMode method in lynx_output always uses the same implementation and there is no point to use redirection rather than direct function call. Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24staging: sm750fb: replace lynx_crtc methods with function callsMike Rapoport1-8/+4
The methods in lynx_crtc always use the same implementation and there is no point to use redirection rather than direct function call. Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-24staging: sm750fb: remove unused methods from lynx_shareMike Rapoport1-6/+0
The suspend and resume methods in lynx_share are not implemented and never set. Remove them. Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-16Staging: sm750fb: sm750: Remove irrelevant codeShivani Bhardwaj1-2/+0
The variable ret is only declared and initialized to 0, but never referenced, so remove it. Signed-off-by: Shivani Bhardwaj <shivanib134@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-12staging: sm750fb: Fix the power state error in resumeBinbin Zhou1-0/+1
The PM_EVENT_RESUME state is needed when SM750 resume, otherwise it will be failed in the second time of continuous suspend/resume. Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com> Signed-off-by: Binbin Zhou <zhoubb@lemote.com> Reviewed-by: Huacai Chen <chenhc@lemote.com> Reviewed-by: Teddy Wang <teddy.wang@siliconmotion.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-02staging: sm750fb: remove clear method from lynxfb_{crtc,output}Mike Rapoport1-5/+0
The clear methods of lynxfb_crtc and lynxfb_output are empty and therefore they can be removed. Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-02staging: sm750fb: remove proc_checkMode method from lynxfb_outputMike Rapoport1-5/+1
The proc_checkMode of lynxfb_output is set to function that always returns 0. Calling that function and checking for its return value is meaningless. Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-02staging: sm750fb: remove unneeded switch statementMike Rapoport1-15/+2
The lynxfb_ops_check_var function has two switch statements, the first one checks for validity of var->bits_per_pixel and it is is immediatly followed by another one that sets parameters according to var->bits_per_pixel value. These switch statements can be merged into one. Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29staging: sm750fb: tidy up #include directivesMike Rapoport1-17/+17
Add space between '#include' keyword and the header name Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-07staging: sm750fb: simplify returnSudip Mukherjee1-5/+1
Lets return the return value directly instead of using a variable to store the result. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-07staging: sm750fb: rearrange codeSudip Mukherjee1-14/+13
Rearrange the code to remove one exit label which also makes the code less indented and more readable. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-07staging: sm750fb: fix multiline commentSudip Mukherjee1-24/+39
Multiline comments are edited to be in the kernel coding style. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-07staging: sm750fb: space around operatorSudip Mukherjee1-13/+17
Kernel coding style says to have a space around the operators. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-07staging: sm750fb: remove multiple blank lineSudip Mukherjee1-26/+0
Multiple blank lines are not kernel coding style and so checkpatch complains. Remove them. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14staging: sm750fb: remove unnecessary whitespaceJuston Li1-1/+1
Fixes checkpatch.pl warning: WARNING: unnecessary whitespace before a quoted newline Signed-off-by: Juston Li <juston.h.li@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-07-14staging: sm750fb: coding style global ERROR fixesVinay Simha BN1-3/+3
kernel coding style fixes for below messages from scripts/checkpatch.pl ERROR: do not initialise globals to 0 or NULL Signed-off-by: Vinay Simha BN <simhavcs@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-18drivers: staging: sm750fb: Fix "'foo * bar' should be 'foo *bar'" errorsGreg Donald1-1/+1
Fix checkpatch.pl "'foo * bar' should be 'foo *bar'" errors Signed-off-by: Greg Donald <gdonald@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-18staging: sm750fb: convert pr_err to pr_infoHari Prasath Gujulan Elango1-3/+3
This patch modifies few debug prints from pr_err() to pr_info() as they fall under that category. Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31staging: sm750fb: Fix typo in sm750.cMasanari Iida1-1/+1
This patch fix a spelling typo in printk within sm750.c Signed-off-by: Masanari Iida <standby24x7@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31staging: sm750fb: remove duplicate from fb_videomodeMichel von Czettritz1-3/+0
As suggested by Sudip this patch removes the redundant 1360x768@60 option from the fb_videomode struct array. The removed option and the option one it differ in a typo and a flag. Signed-off-by: Michel von Czettritz <michel.von.czettritz@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-24staging: sm750: Fix lynxfb_ops_imageblit() if image->depth != 1Huacai Chen1-0/+3
If image->depth != 1, lynxfb_ops_imageblit() should fallback to call cfb_imageblit(), not return directly. Otherwise it can't display the boot logo. Cc: Teddy Wang <teddy.wang@siliconmotion.com> Acked-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com> Signed-off-by: Huacai Chen <chenhc@lemote.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-24staging: sm750fb: use arch_phys_wc_add() and ioremap_wc()Luis R. Rodriguez1-32/+4
The same area used for ioremap() is used for the MTRR area. Convert the driver from using the x86 specific MTRR code to the architecture agnostic arch_phys_wc_add(). arch_phys_wc_add() will avoid MTRR if write-combining is available, in order to take advantage of that also ensure the ioremap'd area is requested as write-combining. There are a few motivations for this: a) Take advantage of PAT when available b) Help bury MTRR code away, MTRR is architecture specific and on x86 its replaced by PAT c) Help with the goal of eventually using _PAGE_CACHE_UC over _PAGE_CACHE_UC_MINUS on x86 on ioremap_nocache() (see commit de33c442e titled "x86 PAT: fix performance drop for glx, use UC minus for ioremap(), ioremap_nocache() and pci_mmap_page_range()") The conversion done is expressed by the following Coccinelle SmPL patch, it additionally required manual intervention to address all the #ifdery and removal of redundant things which arch_phys_wc_add() already addresses such as verbose message about when MTRR fails and doing nothing when we didn't get an MTRR. @ mtrr_found @ expression index, base, size; @@ -index = mtrr_add(base, size, MTRR_TYPE_WRCOMB, 1); +index = arch_phys_wc_add(base, size); @ mtrr_rm depends on mtrr_found @ expression mtrr_found.index, mtrr_found.base, mtrr_found.size; @@ -mtrr_del(index, base, size); +arch_phys_wc_del(index); @ mtrr_rm_zero_arg depends on mtrr_found @ expression mtrr_found.index; @@ -mtrr_del(index, 0, 0); +arch_phys_wc_del(index); @ mtrr_rm_fb_info depends on mtrr_found @ struct fb_info *info; expression mtrr_found.index; @@ -mtrr_del(index, info->fix.smem_start, info->fix.smem_len); +arch_phys_wc_del(index); @ ioremap_replace_nocache depends on mtrr_found @ struct fb_info *info; expression base, size; @@ -info->screen_base = ioremap_nocache(base, size); +info->screen_base = ioremap_wc(base, size); @ ioremap_replace_default depends on mtrr_found @ struct fb_info *info; expression base, size; @@ -info->screen_base = ioremap(base, size); +info->screen_base = ioremap_wc(base, size); Generated-by: Coccinelle SmPL Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com> Cc: Teddy Wang <teddy.wang@siliconmotion.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Suresh Siddha <sbsiddha@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Juergen Gross <jgross@suse.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Dave Airlie <airlied@redhat.com> Cc: Antonino Daplas <adaplas@gmail.com> Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com> Cc: devel@driverdev.osuosl.org Cc: linux-fbdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-18Merge 4.1-rc4 into staging-nextGreg Kroah-Hartman1-1/+1
We want the fixes in here for testing and merge issues. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08Staging: fixed multiple spelling errors.Carlos E. Garcia1-6/+6
Fixed multiple spelling errors. Signed-off-by: Carlos E. Garcia <carlos@cgarcia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08staging: sm750: remove incorrect __exit annotationArnd Bergmann1-1/+1
The lynxfb_pci_remove function is used as the 'remove' callback of the driver, and must not be discarded: lynxfb_pci_remove' referenced in section `.data' of drivers/built-in.o: defined in discarded section `.exit.text' of drivers/built-in.o This removes the extraneous annotation. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-03staging: sm750: move assignment out of if condMichel von Czettritz1-3/+6
This patch moves the assignments from the if conditions to the line before the condition. The 3 occurrence are return values and the checks for errors. Signed-off-by: Michel von Czettritz <michel.von.czettritz@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-03staging: sm750: fix whitspace for cast to pointerMichel von Czettritz1-3/+3
This patch fixes the checkpatch.pl warning: 'ERROR: "(foo*)" should be "(foo *)"' Signed-off-by: Michel von Czettritz <michel.von.czettritz@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-03staging: sm750: fix whitespaceMichel von Czettritz1-9/+9
This patch fixes whitespace checkpatch.pl warnings and errors. Mainly whitespaces around operators. - ERROR: spaces required around that ':' (ctx:VxW) - ERROR: space required after that ';' (ctx:VxV) - ERROR: spaces required around that '<' (ctx:VxV) - ERROR: spaces required around that '!=' (ctx:VxV) And some small warnings around whitespace: - ERROR: trailing whitespace - WARNING: space prohibited before semicolon - WARNING: unnecessary whitespace before a quoted newline Signed-off-by: Michel von Czettritz <michel.von.czettritz@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-03staging: sm750: blank line after declarationMichel von Czettritz1-8/+14
This patch fixes "WARNING: Missing a blank line after declaration" checkpatch.pl warnings. Signed-off-by: Michel von Czettritz <michel.von.czettritz@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-03staging: sm750: 80 characters per lineMichel von Czettritz1-38/+72
This patch inserts line breaks to make lines fit into 80 characters and increase readability. Signed-off-by: Michel von Czettritz <michel.von.czettritz@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-03staging: sm750: comment formatingMichel von Czettritz1-23/+19
This patch fixes checkpatch.pl warnings / errors: - "WARNING: please, no space before tabs" - "ERROR: do not use C99 // comments" Signed-off-by: Michel von Czettritz <michel.von.czettritz@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-03staging: sm750: no braces for single stmt if blocksMichel von Czettritz1-6/+3
This patches fixes checkpatch.pl warning: "WARNING: braces {} are not necessary for single statement blocks" Signed-off-by: Michel von Czettritz <michel.von.czettritz@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-03staging: sm750: fix whitespaces around pointersMichel von Czettritz1-76/+77
This patch fixes checkpatch.pl errors: - ERROR: "foo * bar" should be "foo *bar" - ERROR: "foo* bar" should be "foo *bar" Signed-off-by: Michel von Czettritz <michel.von.czettritz@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-03staging: sm750: fix whitespace around bracesMichel von Czettritz1-97/+97
Fix multiple similar checkpatch.pl errors: - "ERROR: space required before the open parenthesis '('" - "ERROR: space required before the open brace '{'" - "ERROR: space prohibited after that open parenthesis '('" - "ERROR: space prohibited before that close parenthesis ')'" Signed-off-by: Michel von Czettritz <michel.von.czettritz@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-03staging: sm750: move '{' to previous lineMichel von Czettritz1-34/+16
Fix checkpatch.pl error: "ERROR: that open brace { should be on the previous line" Signed-off-by: Michel von Czettritz <michel.von.czettritz@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-03staging: sm750: add missing spaces after ','Michel von Czettritz1-132/+132
Fixes checkpatch.pl error: "ERROR: space required after that ',' (ctx:VxV)" Signed-off-by: Michel von Czettritz <michel.von.czettritz@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-03staging: sm750: ReindentMichel von Czettritz1-494/+491
The reindent fixes the "WARNING: please, no spaces at the start of a line", "ERROR: code indent should use tabs where possible" and some other small checkpatch.pl warnings and errors. Signed-off-by: Michel von Czettritz <michel.von.czettritz@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26staging: sm750fb: Remove spinlock helper functionLorenzo Stoakes1-23/+30
This patch removes the unnecessary spinlock helper function and instead calls spin_lock and spin_unlock directly. This does *not* resolve sparse warnings about context imbalances but these are spurious. Signed-off-by: Lorenzo Stoakes <lstoakes@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26staging: sm750fb: Use memset_io instead of memsetLorenzo Stoakes1-6/+6
This patch takes into account that cursor->vstart, crtc->vScreen and share->pvMem are pointers to memory-mapped I/O and thus we should use memset_io to make this explicit. In addition, some architectures require special treatment of memory-mapped I/O so the previous code could actually break without this change. This fixes the following sparse warnings:- drivers/staging/sm750fb/sm750.c:489:17: warning: incorrect type in argument 1 (different address spaces) drivers/staging/sm750fb/sm750.c:490:17: warning: incorrect type in argument 1 (different address spaces) drivers/staging/sm750fb/sm750.c:501:17: warning: incorrect type in argument 1 (different address spaces) drivers/staging/sm750fb/sm750.c:502:17: warning: incorrect type in argument 1 (different address spaces) drivers/staging/sm750fb/sm750.c:833:5: warning: incorrect type in argument 1 (different address spaces) drivers/staging/sm750fb/sm750.c:1154:9: warning: incorrect type in argument 1 (different address spaces) Signed-off-by: Lorenzo Stoakes <lstoakes@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-15staging: sm750fb: remove intialization of static intsSupriya Karanth1-3/+3
static ints are initialized to 0 by the compiler. Explicit initialization is not necessary. Found by checkpatch.pl - ERROR: do not initialise statics to 0 or NULL changes made using coccinelle script: @@ type T; identifier var; @@ static T var - =0 ; Signed-off-by: Supriya Karanth <iskaranth@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-15staging: sm750: Fix switch-case indentationIoana Ciornei1-79/+79
Remove switch cases indentation in order to follow the Linux coding style. Signed-off-by: Ioana Ciornei <ciorneiioana@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-10staging: sm750fb: Use kzalloc rather than kmalloc followed by memset with 0Madhusudhanan Ravindran1-2/+1
The semantic patch that makes this change is available in scriptcoccinelle/api/alloc/kzalloc-simple.cocci. Signed-off-by: Madhusudhanan Ravindran <mravindran04@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-10staging: sm750fb: correct integer comparisonSudip Mukherjee1-1/+1
fixed the build warning about comparison of pointer and integer. end of string was being compared to NULL. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-10staging: sm750fb: fix mixed declarationsSudip Mukherjee1-1/+2
we were getting build warning about mixed declaration. the variable is now declared at the beginning of the block. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-10staging: sm750fb: remove unused functionsSudip Mukherjee1-65/+0
removed the functions which were not used anywhere. it has been build tested also confirmed with git grep that there is no other reference of these functions. Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-10staging: sm750fb: fix build failureSudip Mukherjee1-2/+0
for powerpc-allyesconfig build failed with an error of g_option undeclared. we will get this error on all architecture if MODULE is not defined. fixed the declaration of g_option. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>