summaryrefslogtreecommitdiff
path: root/drivers/staging/sm750fb
AgeCommit message (Collapse)Author
2015-11-16Staging: sm750fb: Remove unused modedb.h fileShraddha Barke
The header file modedb.h is only included in sm750.c but the things defined by modedb.h are not used anywhere in sm750.c. Thus, drop the include in sm750.c and modedb.h can be dropped completely. Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com> Acked-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27staging: sm750fb: remove unused fields from struct sm750_devMike Rapoport
The {x,y}LCD fields of struct sm750_dev are not used and can be removed. Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27staging: sm750fb: remove '#ifdef CAP_EXP*' conditionalsMike Rapoport
There are several occurencies of '#ifdef CAP_EXP<something>', spelled differently each time. None of these is ever defined and therefore they enclose dead code that can be removed. Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27staging: sm750fb: merge lynx_share into sm750_devMike Rapoport
Both struct lynx_share and struct sm750_dev reprsent some parts of the SM750 graphics adapter. There is no point to keep these parts in different structures. Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27staging: sm750fb: remove unused field in lynx_cursorMike Rapoport
The lynx_share field in lynx_cursor structure is never used and can be removed. Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27staging: sm750fb: fix wrong indentationMike Rapoport
Fix wrong indentation of a line in lynxfb_set_fbinfo Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27staging: sm750fb: use sm750_dev with pci_{get, set}_drvdataMike Rapoport
Use sm750_dev as private driver data for the PCI device Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27staging: sm750fb: use 'struct sm750_dev *' instead of 'void *'Mike Rapoport
Use proper 'struct sm750_dev *' type instead of 'void *' Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27staging: sm750fb: replace lynx_share with sm750_dev in function callsMike Rapoport
Use sm750_dev rather than lynx_share as parameter for hw_sm750_map, hw_sm750_inithw and hw_sm750_initAccel functions. Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27staging: sm750fb: remove hw_sm750_getVMSize functionMike Rapoport
The hw_sm750_getVMSize wraps ddk750_getVMSize without any added functionality. Call ddk750_getVMSize directly and remove hw_sm750_getVMSize. Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27staging: sm750fb: replace lynx_share with sm750_dev in lynxfb_parMike Rapoport
Use sm750_dev instead of lynx_share in the private data of the frambuffer device. Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27staging: sm750fb: remove unused PROC_SPEC_* typedefsMike Rapoport
The PROC_SPEC* typedefs are not used and can be removed Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27staging: sm750fb: merge struct sm750_state into struct sm750_devMike Rapoport
The struct sm750_state is never used on its own. Merge it into the struct sm750_dev. Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27staging: sm750fb: rename 'struct sm750_dev' variables to sm750_devMike Rapoport
Use consistent naming for 'struct sm750_dev' variables Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27staging: sm750fb: rename struct sm750_share to sm750_devMike Rapoport
The struct sm750_share represents the device state and name sm750_dev seems more appropriate. Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-27staging: sm750fb: merge sm750_hw.h into sm750.hMike Rapoport
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 Rapoport
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 Rapoport
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: remove unused SPC_SM750 defineMike Rapoport
The SPC_SM750 define is not used and can be removed 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 Rapoport
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-25staging: sm750fb: use direct call to hw_sm750_output_setModeMike Rapoport
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-25staging: sm750fb: replace lynx_crtc methods with function callsMike Rapoport
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-25staging: sm750fb: remove unused methods from lynx_shareMike Rapoport
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-25staging: sm750fb: remove ancient kernel supportMike Rapoport
Remove the code that should be compiled for ancient kernel versions together with controlling '#if LINUX_VERSION_CODE' conditionals Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-25staging: sm750fb: remove defintion of offsetofMike Rapoport
There is no need to redefine offsetof Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-25staging: sm750fb: remove unused pllcalparam typedefMike Rapoport
The pllcalparam type is not used and can be removed. Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-25staging: sm750fb: simplify PLL divisors calculationsMike Rapoport
The calcPllValues currently uses arrays of PLL parametres that contain possible PLL control register field values and redundant data that is calculated according to those values. The usage of these arrays can be replaced with simple arithmetics. Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-25staging: sm750fb: remove '#if 1' conditionalsMike Rapoport
The code enclosed in '#if 1' anyway gets compiled. Removing useless conditionals. Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-25staging: sm750fb: Replace uint32_t with u32Amitoj Kaur Chawla
Replace uint32_t with u32 consistent with Linux kernel coding practice. Problem found using checkpatch.pl Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-25staging: sm750fb: Replace include <asm/*.h> with include <linux/*.h>Amitoj Kaur Chawla
Problem found using checkpatch.pl WARNING: Use #include <linux/io.h> instead of <asm/io.h> WARNING: Use #include <linux/uaccess.h> instead of <asm/uaccess.h> Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-17staging: sm750fb: Prefer using BIT MacroAmitoj Kaur Chawla
Replace bit shifting on 1 with the BIT(x) Macro Problem found using checkpatch.pl WARNING: 'Prefer using the BIT macro' Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-17Staging: sm750fb: sm750: Remove irrelevant codeShivani Bhardwaj
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-17staging: sm750fb: remove some unnecessary castingsMike Rapoport
The clock divisor calculations in setMasterClock and setMemoryClock unnecessaryly cast unsigned int to unsigned int. Removing the casting. Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-17staging: sm750fb: rename getChipClock to get_mxclk_freqMike Rapoport
The getChipClock is used to detect MXCLK frequency. Make it's name reflect what the function is actually doing. Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-17staging: sm750fb: merge calcPLL and getPllValue into getChipClockMike Rapoport
The getChipClock function is used only to get MXCLK frequency, which makes most of getPllValue function unused and thus. The detection of MXCLK frequency may be implemented directly in getChipClock rendering getPllValue and calcPLL unused. Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-13staging: sm750fb: Fix the power state error in resumeBinbin Zhou
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-13staging: sm750fb: Add space around '&'Amitoj Kaur Chawla
Add space around operator '&'. Problem found using checkpatch.pl CHECK: spaces preferred around that '&' (ctx:VxV) Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-13staging: sm750fb: Add space around '<<'Amitoj Kaur Chawla
Add space around operator '<<'. Problem found using checkpatch.pl CHECK: spaces preferred around that '<<' (ctx:VxV) Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-13staging: sm750fb: Remove multiple blank linesAmitoj Kaur Chawla
Remove multiple blank lines. Problem found using checkpatch.pl CHECK: Please don't use multiple blank lines Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-13staging: sm750fb: Rename dispStateAmitoj Kaur Chawla
Rename dispState to disp_state to avoid CamelCase. Problem found using checkpatch.pl CHECK: Avoid CamelCase: <dispState> Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-13staging: sm750fb: Remove multiple blank linesAmitoj Kaur Chawla
Remove multiple blank lines. Problem found using checkpatch.pl CHECK: Please don't use multiple blank lines Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-13staging: sm750fb: Rename miniDiffAmitoj Kaur Chawla
Rename miniDiff to mini_diff to avoid CamelCase. Problem found using checkpatch.pl CHECK: Avoid CamelCase: <miniDiff> Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-13staging: sm750fb: Remove space after opening braceAmitoj Kaur Chawla
Remove space after opening brace '{'. Problem found using checkpatch.pl CHECK: Blank lines aren't necessary after an open brace '{' Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-13staging: sm750fb: Remove space before closing braceAmitoj Kaur Chawla
Remove space before closing brace '}'. Problem found using checkpatch.pl CHECK: Blank lines aren't necessary before a close brace '}' Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-13staging: sm750fb: Remove space after castAmitoj Kaur Chawla
Remove unnecessary space after cast. Problem found using checkpatch.pl CHECK: No space is necessary after a cast Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-13Staging: sm750fb: Use ARRAY_SIZE macroShraddha Barke
ARRAY_SIZE is more concise to use when the size of an array is divided by the size of its first element. Changes made using Coccinelle- @@ type T; T[] E; @@ - (sizeof(E)/sizeof(E[...])) + ARRAY_SIZE(E) Signed-off-by: Shraddha Barke <shraddha.6596@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-08staging: sm750fb: Remove multiple blank linesAmitoj Kaur Chawla
Remove multiple blank lines. Problem found using checkpatch.pl CHECK: Please don't use multiple blank lines Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-08staging: sm750fb: Add space around ':'Amitoj Kaur Chawla
Add space around operator ':'. Problem found using checkpatch.pl CHECK: spaces preferred around that ':' (ctx:VxV) Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-08staging: sm750fb: Add space around '?'Amitoj Kaur Chawla
Add space around operator '?'. Problem found using checkpatch.pl CHECK: spaces preferred around that '?' (ctx:VxV) Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-08staging: sm750fb: Add space around '*'Amitoj Kaur Chawla
Add space around operator '*'. Problem found using checkpatch.pl CHECK: spaces preferred around that '*' (ctx:VxV) Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>