Commit Graph

36 Commits (46a00d83ffb0d040f18068234e0eda8332c1e798)

Author SHA1 Message Date
Jesper Juhl 7e978a115f Remove unneeded version.h includes from drivers/staging/xgifb/
It was pointed out by 'make versioncheck' that some includes of
linux/version.h are not needed in drivers/staging/xgifb/.
This patch removes them.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-07-05 10:39:37 -07:00
Kenji Toyama 1d7f656dc5 Staging: xgifb: Fixed lots of coding style issues.
There were hundreds of warnings and errors given by checkpatch.pl but
now it's down to 20. These ones that were left in the code need some
more attention, cause I reckon the functions are overly nested leading
to a mess of code in a traditional 80 character screen. I'm sure this code
can be refactored into something more visually pleasing (things like
compressing two nested if's into a single if with an AND would help a
lot already).

Signed-off-by: Daniel Kenji Toyama <kenji.toyama@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-04-25 17:30:41 -07:00
Lucas De Marchi 25985edced Fix common misspellings
Fixes generated by 'codespell' and manually reviewed.

Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
2011-03-31 11:26:23 -03:00
Aaro Koskinen dc50556bbb staging: xgifb: rename XGINew_SetRegAND() to xgifb_reg_and()
Rename XGINew_SetRegAND() to xgifb_reg_and().

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-03-14 11:52:33 -07:00
Aaro Koskinen ec9e5d3e73 staging: xgifb: rename XGINew_SetRegANDOR() to xgifb_reg_and_or()
Rename XGINew_SetRegANDOR() to xgifb_reg_and_or().

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-03-14 11:52:33 -07:00
Aaro Koskinen b9bf6e4e62 staging: xgifb: rename XGINew_SetRegOR() to xgifb_reg_or()
Rename XGINew_SetRegOR() to xgifb_reg_or().

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-03-14 11:52:32 -07:00
Aaro Koskinen 58839b0194 staging: xgifb: rename XGINew_GetReg1() to xgifb_reg_get()
Rename XGINew_GetReg1() to xgifb_reg_get().

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-03-14 11:52:32 -07:00
Aaro Koskinen 8104e32996 staging: xgifb: rename XGINew_SetReg1() to xgifb_reg_set()
Rename XGINew_SetReg1() to xgifb_reg_set().

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-03-14 11:52:31 -07:00
Aaro Koskinen efdf4ee78c staging: xgifb: replace XGINew_SetReg3() with outb()
Replace XGINew_SetReg3() with outb().

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-03-14 11:52:31 -07:00
Aaro Koskinen d8ad0a6d29 staging: xgifb: replace XGINew_GetReg2() with inb()
Replace XGINew_GetReg2() with inb().

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-03-14 11:52:30 -07:00
Aaro Koskinen 0658733528 staging: xgifb: eliminate redudant chip type >= XG40 checks
Since all chips supported by the driver are >= XG40, these checks are
redundant and the code can be modified accordingly.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-03-14 11:52:26 -07:00
Aaro Koskinen fd0ad4701a staging: xgifb: delete dead code for chip types < XG40
XG40 is the first supported chip, so the code for earlier chips can
be dropped.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-03-14 11:52:25 -07:00
Aaro Koskinen cc1e2398f7 staging: xgifb: vb_setmode: move functions to avoid forward declarations
Move functions to avoid forward declarations.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-03-14 11:52:24 -07:00
Aaro Koskinen 5e60b97cb1 staging: xgifb: vb_setmode: include the .h file
Include the file's .h file and delete the duplicate declarations from
the .c file.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-03-09 16:02:54 -08:00
Aaro Koskinen 063b9c4b89 staging: xgifb: vb_setmode: make internal functions static
Make internal functions static and remove unneeded forward declarations.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-03-09 16:02:53 -08:00
Aaro Koskinen d80aaa01ae staging: xgifb: replace XGINew_LCD_Wait_Time() with mdelay()
XGINew_LCD_Wait_Time() is implemented using the I/O port 0x61, which is
X86-specific and will fail on other platforms. The code did not make any
sense, but I guess the intention has been to provide a function where
the unit for the delay is milliseconds.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 12:38:18 -08:00
Dan Carpenter a65fd09ac5 Staging: xgfib: put parenthesis in the right place
In the original code the parenthesis are in the wrong position, so the
conditions are always true.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-20 12:01:23 -08:00
Greg Kroah-Hartman 51973d7fa0 Staging: xgifb: revert a warning fix and resolve it properly
Jiri pointed out that the previous compiler warning fix was incorrect as
the compiler was properly saying that the variable was not being set.
This was due to a #define commenting out all of the logic in the
function.

This patch reverts Javier's previous one, and properly fixes the issue
by making the function actually doing something.

Reported-by: Jiri Slaby <jirislaby@gmail.com>
Cc: Javier Martinez Canillas <martinez.javier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-08 01:49:45 -07:00
Javier Martinez Canillas d6835e8417 staging: xgifb: Initialize uninitialized variables
Current patch solves compilation warnings in staging/xgifb for using
possibly uninitialized variables.

Signed-off-by: Javier Martinez Canillas <martinez.javier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-06 23:18:18 -07:00
Prashant P. Shah 21df8fc82c Staging: xgifb: fixed many style issue in vb_setmode.c
This is a patch to the vb_setmode.c file that fixes many style
issues found by the checkpatch.pl tool.
- extra spaces
- invalid code indent
- extra braces
- invalid comment style

Signed-off-by: Prashant P. Shah <pshah.mumbai@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-09-04 21:37:47 -07:00
Randy Dunlap 8922967ea3 Staging: xgifb: fix lots of sparse warnings
Fix many sparse warnings about data or functions being static.
Fix many sparse warnings about data or functions not being used
  (put them inside #if 0/#endif blocks).
Fix sparse warnings about 0 being used for NULL.
Fixed a small bit of source formatting when those lines were being
  modified anyway, but there is still lots of this yet to be done.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: devel@driverdev.osuosl.org
Cc: Arnaud Patard <apatard@mandriva.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-08-31 14:51:53 -07:00
Bill Pemberton 80adad85ea Staging: xgifb: Remove typedefs in vb_struct.h
This removes all the remaining typedefs in vb_struct.h

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Arnaud Patard <apatard@mandriva.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-22 14:33:34 -07:00
Bill Pemberton e4147abe8b Staging: xgifb: Remove XGI_HW_DEVICE_INFO and PXGI_HW_DEVICE_INFO typedefs
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Arnaud Patard <apatard@mandriva.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-22 14:33:33 -07:00
Bill Pemberton 108afbf8ae Staging: xgifb: Remove SHORT, UCHAR, and LONG typedef
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Arnaud Patard <apatard@mandriva.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-22 14:33:19 -07:00
Bill Pemberton 82d6eb5b2e Staging: xgifb: Remove USHORT, ULONG, BOOLEAN, and VOID typedefs
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Arnaud Patard <apatard@mandriva.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-22 14:32:32 -07:00
Bill Pemberton 490ce818c6 Staging: xgifb: Remove unused code
Remove code that was removed using #if 0

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Arnaud Patard <apatard@mandriva.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-22 14:30:54 -07:00
Bill Pemberton fc3678a6c0 Staging: xgifb: Remove PUSHORT, PLONGU, and PVOID typedefs
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Arnaud Patard <apatard@mandriva.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-22 14:30:53 -07:00
Bill Pemberton dda08c5968 Staging: xgifb: Remove defines for TRUE, FALSE, and NULL
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Arnaud Patard <apatard@mandriva.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-22 14:30:53 -07:00
Bill Pemberton 1e59f7119f Staging: xgifb: Remove port macros in osdef.h
The port related macros in osdef.h are replaced with calls to out?()
and in?().  This removes the last macros defined in osdef.h, so this
file is no longer needed.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Arnaud Patard <apatard@mandriva.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-22 14:30:07 -07:00
Bill Pemberton cc75bb02db Staging: xgifb: Remove XGI_SetMemory and XGI_MemoryCopy
These were just macros for memset and memcpy, so use those instead.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Arnaud Patard <apatard@mandriva.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-22 14:25:48 -07:00
Bill Pemberton f2f58e14ef Staging: xgifb: Remove use of LINUX_KERNEL define
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Arnaud Patard <apatard@mandriva.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-22 14:20:44 -07:00
Bill Pemberton 84c7603c38 Staging: xgifb: Remove use of LINUX_XF86 define
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Arnaud Patard <apatard@mandriva.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-22 14:20:37 -07:00
Bill Pemberton 784cfe1d07 Staging: xgifb: Remove use of TC define
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Arnaud Patard <apatard@mandriva.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-22 14:20:37 -07:00
Bill Pemberton bf4fc6ac01 Staging: xgifb: Remove code for WIN2000
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Arnaud Patard <apatard@mandriva.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-22 14:20:37 -07:00
Bill Pemberton 23aada9cc3 Staging: xgifb: remove use of LINUX_VERSION_CODE
Remove ifdefs that check LINUX_VERSION_CODE as this is
not needed in the staging tree.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Cc: Arnaud Patard <apatard@mandriva.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-22 14:20:37 -07:00
apatard@mandriva.com d7636e0b07 staging: Add framebuffer driver for XGI chipsets
This driver handles XG20, XG21, XG40, XG42 chipsets from XGI. They're
also known as Z7,Z9,Z11 chipsets. It's based on the SiS fb driver but
has been heavily modified by XGI to support their newer chipsets.


Signed-off-by: Arnaud Patard <apatard@mandriva.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-04 13:38:51 -07:00