Commit Graph

67 Commits

Author SHA1 Message Date
Sudip Mukherjee 8efba0e0d0 staging: sm7xxfb: fix camelcase
Fix the checkpatch warning about CamelCase.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-17 21:44:30 -07:00
Sudip Mukherjee e09df4870e staging: sm7xxfb: fix indention
Fix the odd indention of vesa_mode_table.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-17 21:44:30 -07:00
Sudip Mukherjee dac7c1bd1e staging: sm7xxfb: move mode table
move vgamode table from the header file to the C file and mark it
as const.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-17 21:44:29 -07:00
Sudip Mukherjee 36fa82a6f0 staging: sm7xxfb: reduce indention
reduce code indention keeping the logic same.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-17 21:44:29 -07:00
Sudip Mukherjee f5daff3f79 staging: sm7xxfb: fix alignment
Fix the alignment.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-17 21:44:29 -07:00
Sudip Mukherjee 3e4b559838 staging: sm7xxfb: no space after cast
fixes the checkpatch warning about using space after typecast.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-17 21:44:29 -07:00
Sudip Mukherjee c32305b546 staging: sm7xxfb: add newline
new line was missing in some of the dev_* macros while printing
the debug and error messages.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-17 21:44:29 -07:00
Sudip Mukherjee 7caf463de8 staging: sm7xxfb: remove numvgamodes
numvgamodes was only used in one place, so remove the #define
and use its defined value.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-17 21:44:29 -07:00
Sudip Mukherjee 9d91928c9d staging: sm7xxfb: declare struct as const
The vesa_mode_table is not to be modified, so declare it as const.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-06-17 21:44:29 -07:00
Sudip Mukherjee d8496fb493 staging: sm7xxfb: remove unused functions
removed the smtc_alloc_fb_info() and smtc_free_fb_info() functions which
were not used anymore.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08 09:24:12 +02:00
Sudip Mukherjee cd14ad8be7 staging: sm7xxfb: use framebuffer_alloc and release
use the standard framebuffer_alloc() and framebuffer_release() instead
of custom defined function. for making that change we had to change a
member of the private structure from a variable to pointer and had to
touch almost all places of the file. since fb was changed into a pointer
so all instance of "sfb->fb." has been changed into "sfb->fb->".
now we will get build warning about smtc_alloc_fb_info() and
smtc_free_fb_info() to be unused which will be removed in the next
patch of the series.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-08 09:24:12 +02:00
Sudip Mukherjee f83e775d6e staging: sm7xxfb: disable pci device
disable the pci device when the module exits.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-03 13:55:03 +02:00
Sudip Mukherjee f30a746bec staging: sm7xxfb: reserve PCI resource
before starting to access any address inside the PCI region we should
reserve the resource and release the resource when the module exits.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-04-03 13:55:03 +02:00
Sudip Mukherjee 855fe6ea96 staging: sm7xxfb: add MODULE_DEVICE_TABLE
add MODULE_DEVICE_TABLE to support hot-plugging.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26 13:02:28 +01:00
Sudip Mukherjee 71ce762feb staging: sm7xxfb: change return of sm7xx_vga_setup
change return type of sm7xx_vga_setup() to void as we are not using
the return type anywhere. if this function fails we fall back to the
default configuration.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-20 13:56:03 +01:00
Sudip Mukherjee f0f37e658c staging: sm7xxfb: remove unneeded __setup
as we start to use kernel boot parameters and fb_get_options()
we donot need to use __setup() any more.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-20 13:56:03 +01:00
Sudip Mukherjee c65434eb26 staging: sm7xxfb: use module init and exit
use module_init() and module_exit() instead of module_pci_driver
and at the same time make way for use of kernel boot parameters.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-20 13:56:03 +01:00
Sudip Mukherjee c3d6047d95 staging: sm7xxfb: make vgamode static
the variable vgamode is used only in this file and hence can be
safely made as static.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-06 16:35:54 -08:00
Sudip Mukherjee c4d507677f staging: sm7xxfb: fix remaining CamelCase
since mixed case names are not encouraged in coding, so those has
been changed to their corresponding lowercase version.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-02-07 17:37:52 +08:00
Sudip Mukherjee 741218984e staging: sm7xxfb: fix CamelCase
since mixed case names are not encouraged in coding, so those has
been changed to their corresponding lowercase version.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-02-07 17:34:58 +08:00
Max Perepelitsyn 11862b36ce staging: sm7xxfb: make smtc_scr_info static
This symbol is never used anywhere else besides sm7xxfb.c

Signed-off-by: Max Perepelitsyn <mperepelitsyn@gmail.com>
Tested-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-02-07 17:34:57 +08:00
Sudip Mukherjee f049a526ad staging: sm7xxfb: fix alignment
checkpatch cleanup: alignment should match open parenthesis

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-25 20:20:03 +08:00
Sudip Mukherjee f64ac7deba staging: sm7xxfb: remove unnecessary blank lines
checkpatch cleanup: blank lines are not necessary before closing brace
and after opening brace.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-25 20:20:03 +08:00
Sudip Mukherjee 53f54a48ac staging: sm7xxfb: no space is necessary after a cast
checkpatch cleanup: space is not necessary after cast

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-25 20:20:03 +08:00
Sudip Mukherjee a1f6da67be staging: sm7xxfb: add missing blank line
checkpatch cleanup to add missing blank line after declaration

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-25 20:20:03 +08:00
Sudip Mukherjee d14d0dade5 staging: sm7xxfb: update TODO file
update the email addresses in the TODO file, also update the final
destination of this driver.

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-25 20:20:02 +08:00
Sudip Mukherjee a8e8f89dad Revert "staging: sm7xxfb: remove driver"
This reverts commit "dc93c85235efa5201e9a3c116bc3fbd1afc1a182"

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-25 20:20:02 +08:00
Greg Kroah-Hartman dc93c85235 staging: sm7xxfb: remove driver
It hasn't been worked on in a very long time, and the original author
has moved on to a different product as this one is no longer being made.
So remove the driver.  If someone wants to resurect it, and clean it up
and get it merged to the "proper" part of the kernel, this commit can be
reverted.

Cc: Teddy Wang <teddy.wang@siliconmotion.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-28 14:04:28 -08:00
Monam Agarwal 7dd1a0a9e0 Staging: sm7xxfb: Fix quoted string split across lines in sm7xxfb.c
This patch fixes the following checkpatch.pl issues in sm7xxfb.c:
WARNING: Quoted string split across lines

Signed-off-by: Monam Agarwal <monamagarwal123@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-27 14:47:17 -08:00
Rashika Kheria 22bf290e88 drivers: sm7xxfb: Mark function as static in sm7xxfb.c
Mark function smtcfb_setmode() as static in sm7xxfb.c because it is not
used outside this file.

This eliminates the following warning in sm7xxfb.c:
drivers/staging/sm7xxfb/sm7xxfb.c:588:6: warning: no previous prototype for ‘smtcfb_setmode’ [-Wmissing-prototypes]

Signed-off-by: Rashika Kheria <rashika.kheria@gmail.com>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Acked-by: Javier M. Mellid <jmunhoz@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-08 15:45:24 -08:00
Jingoo Han 41e043fcfa staging: remove DEFINE_PCI_DEVICE_TABLE macro
Don't use DEFINE_PCI_DEVICE_TABLE macro, because this macro
is not preferred.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-02 22:32:35 -08:00
Ebru Akagunduz 50886656a8 Staging: sm7xxfb: fix line over 80 characters in sm7xxfb.c
Fix checkpatch.pl issues with line over 80 characters
in sm7xxfb.c

Signed-off-by: Ebru Akagunduz <ebru.akagunduz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-10-11 13:52:01 -07:00
Martin Berglund 8e651bb933 Staging: sm7xxfb: fixed line break coding style issues
Fixed coding style issues.

Signed-off-by: Martin Berglund <martin@rogsta.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-30 18:47:00 -07:00
Sachin Kamat 02eb261da3 staging: sm7xxfb: Remove redundant pci_set_drvdata
Driver core sets driver data to NULL upon failure or remove.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-25 16:45:19 -07:00
Peter Huewe 0f1bf4baf6 staging/sm7xxfb: Convert to SIMPLE_DEV_PM_OPS
Instead of assigning the pm_ops fields individually we can simply use
SIMPLE_DEV_PM_OPS.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Acked-by: Javier Muñoz <jmunhoz@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-11 09:23:43 -07:00
Bill Pemberton 361a201859 staging: sm7xxfb: remove use of __devexit
CONFIG_HOTPLUG is going away as an option so __devexit is no
longer needed.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-21 15:05:12 -08:00
Bill Pemberton abe118b48f staging: sm7xxfb: remove use of __devinit
CONFIG_HOTPLUG is going away as an option so __devinit is no longer
needed.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-21 15:05:01 -08:00
Bill Pemberton 38de09a975 staging: sm7xxfb: remove use of __devexit_p
CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer
needed.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-21 15:04:59 -08:00
Javier M. Mellid 87765b9771 staging: sm7xxfb: remove smtc_VRAMBaseAddress
This patch erases smtc_VRAMBaseAddress variable.

Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 14:57:53 -07:00
Javier M. Mellid 3f28ed1741 staging: sm7xxfb: rename pFramebufferPhysical to mmio_base
This patch renames pFramebufferPhysical name to mmio_base.

Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 14:57:53 -07:00
Javier M. Mellid 3da53b1416 staging: sm7xxfb: rename some smtcfb_info fields
This patch improves naming style and comments on smtcfb_info fields.

Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 14:57:53 -07:00
Javier M. Mellid 5d0c77026b staging: sm7xxfb: annotate iomem pointers
This patch annotates iomem pointers.

Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 14:57:52 -07:00
Javier M. Mellid 20d471c447 staging: sm7xxfb: cleanup on smtc_alloc_fb_info
This patch improves code legibility after last changes.

Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 14:57:52 -07:00
Javier M. Mellid 9f6fe04326 staging: sm7xxfb: clean smtcfb_fix's id initialization
Setting up smtcfb_fix's id happens through smtc_alloc_fb_info. It adds
complexity and unnecesary code.

Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 14:57:52 -07:00
Javier M. Mellid d459a03b90 staging: sm7xxfb: clean fb_fix_screeninfo and fb_var_screeninfo initialization
Part of fb_fix_screeninfo and fb_var_screeninfo initialization happens
in smtc_alloc_fb_info. It duplicates code while hiding the real
functionality of smtc_alloc_fb_info. This patch groups initialization
together.

Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-17 14:57:52 -07:00
Devendra Naga d328ddd20e staging: sm7xxfb: copy device name before we pass to the smtc_alloc_fb_info
the name is not initialised and passed to the function smtc_alloc_fb_info
and copies the name into a member of fb structure.

copy the name before calling alloc_fb_info.

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Acked-by: Javier Muñoz <jmunhoz@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-04 14:23:33 -07:00
Stephen Rothwell 59e32c490e staging: sm7xxfb: fix for "rename smtc_screen_info to smtc_scr_info"
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Acked-by: Javier Muñoz <jmunhoz@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-19 15:36:08 -07:00
Devendra Naga cd96aeca4d staging/sm7xxfb: select sm7xxfb only when CONFIG_PCI is enabled
the sm7xxfb is a pci device, and should depend on the PCI.
And also if we wont' depend on the PCI sub-system, the following warns
will be triggered,

drivers/staging/sm7xxfb/sm7xxfb.c:1061:1: warning: data definition has no type or storage class [enabled by default]
drivers/staging/sm7xxfb/sm7xxfb.c:1061:1: warning: type defaults to 'int' in declaration of 'module_pci_driver' [-Wimplicit-int]
drivers/staging/sm7xxfb/sm7xxfb.c:1061:1: warning: parameter names (without types) in function declaration [enabled by default]

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Cc: Teddy Wang <teddy.wang@siliconmotion.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-16 18:55:13 -07:00
Javier M. Mellid 13a05eaa9d staging: sm7xxfb: cleanup on smtc_alloc_fb_info
This patch improves coding style on smtc_alloc_fb_info.

Tested with SM712.

Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-16 18:50:17 -07:00
Javier M. Mellid cd4653ae71 staging: sm7xxfb: move pseudo palette into smtcfb_info
This patch moves pseudo palette into smtcfb_info struct.

Tested with SM712.

Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-07-16 18:50:17 -07:00