dect
/
linux-2.6
Archived
13
0
Fork 0
Commit Graph

310762 Commits

Author SHA1 Message Date
Peter Meerwald 25c38aa3d1 staging: iio: fix typos in simple dummy driver
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-15 14:36:26 -07:00
Lars-Peter Clausen 07a8329c48 staging:iio:adis16400: Fix ADIS163xx AUX_ADC address
The ADIS163xx variants use a different register address for the auxiliary ADC
channel than the ADIS16400. This patch fixes them to use the correct address.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-15 14:36:25 -07:00
Lars-Peter Clausen bb7cf8bc52 staging:iio:adis16400: Fix ADIS16334 temperature address
The channel spec for ADUS16334's temperature channel uses the address and scan
index for the Z-axis acceleration channel. This patch fixes it to use the
temperature channel address and scan index instead.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-15 14:36:25 -07:00
Lars-Peter Clausen 6f30592e8c staging:iio:adis16400: Fix ADIS16300 temperature address
The ADIS16300 uses the same address for the temperature register as the
ADIS16350 and not the same as the ADIS16400.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-15 14:36:25 -07:00
Lars-Peter Clausen 791de6771e staging:iio:adis16400: Fix ADIS16300 ROLL_OUT register address
In the current driver ROLL_OUT register address is the same as the PITCH_OUT
register address. This patch fixes it to use the correct address.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-15 14:36:25 -07:00
Axel Lin d03fcfe626 iio: dac: Convert ad5380 to devm_regmap_* APIs
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-15 14:36:25 -07:00
Leed Aguilar 4d9505af77 staging:iio:gyro:adis16080: remove sparse warnings
Removed the following sparse warning:

In function 'adis16080_read_raw':
warning: 'ut' may be used uninitialized in this function

Signed-off-by: Leed Aguilar <leed.aguilar@ti.com>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Cc: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-14 17:30:17 -07:00
H Hartley Sweeten 871784a5f8 staging: comedi: me4000: remove PDEBUG macro
The PDEBUG macro is used to output a bunch of debug messages in the
driver. These messages might be useful when first creating the driver
but they shouldn't be in mainline. Remove it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-14 17:26:52 -07:00
H Hartley Sweeten ef5bbfcb29 staging: comedi: me4000: remove ISR_PDEBUG macro
The ISR_PDEBUG macro is used to output trace messages in the isr
routine. This shouldn't be in a mainline driver. Remove it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-14 17:26:52 -07:00
H Hartley Sweeten d6cbe537c6 staging: comedi: me4000: remove inline port io wrappers
With the PORT_PDEBUG macro remove we can now remove the inline
port io wrappers.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-14 17:26:52 -07:00
H Hartley Sweeten 3934954b4c staging: comedi: me4000: remove PORT_PDEBUG macro
The PORT_PDEBUG macro is used to output the result of every port
io operation. This shouldn't be in a mainline driver. Remove it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-14 17:26:51 -07:00
H Hartley Sweeten 1d489bab66 staging: comedi: me4000: remove CALL_PDEBUG macro
The CALL_PDEBUG macro is used to do function tracing in the driver.
There are better ways to do this. Remove it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-14 17:26:51 -07:00
H Hartley Sweeten 23bcbb6495 staging: comedi: pcl812: remove PCL812_EXTDEBUG define and related code
The PCL812_EXTDEBUG define enables a bunch of function tracing debug
messages as well as a dump of the comedi_cmd info during the cmdtest.
There are better ways to do the function tracing and the cmdtest
dump shouldn't be in the driver. Just remove all of it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-14 17:25:47 -07:00
H Hartley Sweeten 31a4590ee3 staging: comedi: pcl812: remove unneeded tests in pcl812_ai_cmdtest
The step 2 tests to make sure that the triggers are unique is not
needed for single source triggers. These were already trivially
validated in step 1.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-14 17:25:47 -07:00
H Hartley Sweeten f7f111c214 staging: comedi: pcl818: remove unneeded tests in ai_cmdtest
The step 2 tests of the start_src, scan_begin_src, and scan_end_src
triggers to make sure they are unique are not needed.  These triggers
all only have one source and it was trivially validated in step 1.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-14 17:25:47 -07:00
H Hartley Sweeten 2b8557a734 staging: comedi: pcl816: remove unneeded tests in pcl816_ai_cmdtest
The step 2 tests of the start_src, scan_begin_src, and scan_end_src
triggers to make sure they are unique are not needed.  These triggers
all only have one source and it was trivially validated in step 1.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-14 17:25:47 -07:00
H Hartley Sweeten 985eb50d55 staging: comedi: ni_atmio16d: remove the function tracing debug
These printk's are #ifdef'ed out with an undefined symbol anyway.
Just remove them.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-14 17:25:47 -07:00
Sasha Levin d7be394f7c staging: zcache: don't limit number of pools per client
Currently the amount of pools each client can use is limited to 16, this is
and arbitrary limit which isn't really required by current implementation.

This places and arbitrary limit on the number of mounted filesystems that
can use cleancache.

This patch removes that limit and uses IDR to do sparse mapping of pools
in each client.

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-14 17:24:44 -07:00
Bart Westgeest 7489301a15 staging: usbip: cleanup and fix of vhci_hub_status
Changed setting the status bits to a byte-oriented approach. Number of
written status bits is now based on VHCI_NPORT, instead of casting
status buffer to a long. This fixes a stack corruption bug on 64-bit
based architectures, and potential byte order / endianness related
issues.

In addition updated function comments, and log statements.

Signed-off-by: Bart Westgeest <bart@elbrys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-13 17:22:57 -07:00
Seth Jennings b4b700c5a6 staging: zsmalloc: fix uninit'ed variable warning
This patch fixes an uninitialized variable warning in
alloc_zspage().  It also fixes the secondary issue of
prev_page leaving scope on each loop iteration.  The only
reason this ever worked was because prev_page was occupying
the same space on the stack on each iteration.

Signed-off-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Reported-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-13 17:21:46 -07:00
H Hartley Sweeten 03ae8189ee staging: comedi: 8255: add some whitespace to the #define's
Add whitespace to the _8255_* defines to improve readability.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-13 17:19:17 -07:00
H Hartley Sweeten cf8a6b3d86 staging: comedi: 8255: add namespace to 'do_config' function
The name 'do_config' is pretty generic, and this function is the
only one in this driver without namespace. Add namespace to it
just to avoid any issues.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-13 17:19:16 -07:00
H Hartley Sweeten f9af899b0c staging: comedi: 8255: move the subdev_8255_io function
The subdev_8255_interrupt function indirectly calls subdev_8255_io.
For aesthetic reasons, move the subdev_8255_io function.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-13 17:19:16 -07:00
H Hartley Sweeten 459f299e5b staging: comedi: 8255: refactor subdev_8255_insn function
Refactor the subdev_8255_insn function to follow what the user
space library is doing.

1) This function requires 'data' to contain 2 parameters. Add a
sanity check for this (insn->n != 2).

2) The 'data' parameters are actually a 'mask' of the valid bits and
the actual 'bits' to modify. Create local variables of these names
to help with maintainability.

3) The value returned in data[1] reflects the actual state of the
8255 io pins after the update of the masked bits. Fetch this data
in a local variable and then set data[1].

4) The user space library only checks for a < 0 return to indicate
an error. It appears that the 'return 2' in this function is supposed
to indicate the number of data parameters used to perform the command.
Return the insn->n value for this, the open coded '2' looks wrong.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Iam Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-13 17:19:16 -07:00
H Hartley Sweeten f218d9f57b staging: comedi: 8255: use a local variable for the iobase
To improve readability, use a locale variable to hold the 8255's
private iobase value.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-13 17:19:16 -07:00
H Hartley Sweeten e64fb55b1a staging: comedi: 8255: use kzalloc to allocate the private data
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-13 17:19:16 -07:00
H Hartley Sweeten 3e189f08ef staging: comedi: 8255: check for failure of subdev_8255_init
The initialization of the 8255 subdevice can fail. Make sure to
check for it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-13 17:19:15 -07:00
H Hartley Sweeten 34cfcf9acc staging: comedi: 8255: remove have_irg and refactor subdev_8255_init_irq
The have_irq variable in the 8255 private data is not used by the driver,
remove it.  This removes the need to access the private data in the
subdev_8255_init_irq function.

Also, add a bit of whitespace to improve the readability.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-13 17:19:15 -07:00
H Hartley Sweeten cc31b1be67 staging: comedi: 8255: refactor subdev_8255_init
Refactor the initialization of the 8255 so that the private data
allocation is done before the subdevice is setup. This makes sure
that the setup is complete.

Also, add a bit of whitespace to improve the readability.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-13 17:19:15 -07:00
H Hartley Sweeten d29a18dcdb staging: comedi: 8255: push out the 8255's private data variable rename
Push out the rename of the private variables to improve the readability
of the driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-13 17:19:15 -07:00
H Hartley Sweeten 7a583163e8 staging: comedi: 8255: rename cb_arg and cb_func
The 8255's private data variables cb_arg and cb_func are actually
the iobase for the 8255 device and the pointer to the io function
to access the device. Rename them as such to improve the readability
of the driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-13 17:19:14 -07:00
H Hartley Sweeten 7c61452afc staging: comedi: 8255: remove the s->private access macros
The macros CALLBACK_ARG, CALLBACK_FUNC, and subdevpriv all rely
on a a local variable having a specific name. Replace the macros
with local variables wherever they occur.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-13 17:19:14 -07:00
H Hartley Sweeten a9044d9199 staging: comedi: 8255: rename the private data structure
Rename the 8255's private data structure from subdev_8255_struct
to subdev_8255_private.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-13 17:19:14 -07:00
H Hartley Sweeten e40e8375c0 staging: comedi: 8255: use pointer to dev->subdevices
Instead of accessing the dev->subdevices directly as an array,
use a pointer. This method is more common in the comedi subsystem.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-13 17:19:08 -07:00
H Hartley Sweeten 01bd3e3fc9 staging: comedi: 8255: replace printk calls
Replace the printk calls with dev_info, dev_warn, etc.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-13 17:19:07 -07:00
Peter Huewe 6d12dae47e staging/xgifb: Cleanup vb_device_info struct
This patch cleans up the vb_device_info struct and the related
functions.
The cleanup decreases the size of the compiled module by
about 10kB.

== Remove fields in vb_device_info that are never read: ==
pOutputSelect
pRGBSenseData
pRGBSenseData2
pVideoSenseData
pVideoSenseData2
pYCSenseData
pYCSenseData2
CR49
pXGINew_I2CDefinition
pCR2E
pCR2F
pCR46
pCR47
pCRD0
pCRDE
pSR40
pSR41
pCR47

=== Remove the corresponding 'constants' ===
XGI330_RGBSenseData
XGI330_RGBSenseData2
XGI330_VideoSenseData
XGI330_VideoSenseData2
XGI330_YCSenseData
XGI330_YCSenseData2
XGI330_CR49
XG40_I2CDefinition
XG21_CR2E
XG21_CR2F
XG21_CR46
XG21_CR47
XG27_CRD0
XG27_CRDE
XGI330_OutputSelect

== Remove 'constant fields' and replace constant value with #define ==
pSR07 = XGI330_SR07 -> 0x18
pSR1F = XGI330_SR1F -> 0
pSR23 = XGI330_SR23 -> 0xf6
pSR24 = XGI330_SR24 -> 0x0d
pSR33 = XGI330_SR33 ->0
pCRT2Data_1_2 = XGI330_CRT2Data_1_2 -> 0
pCRT2Data_4_D = XGI330_CRT2Data_4_D -> 0
pCRT2Data_4_E = XGI330_CRT2Data_4_E -> 0
pCRT2Data_4_10 = XGI330_CRT2Data_4_10 -> 0x80
pSR36 = XG27_SR36 -> 0x30
pCR8F = &XG27_CR8F -> 0x0C
pSR40 = XG27_SR40 -> 0x04
pSR41 = XG27_SR41 ->0x00
pSR31 = XGI330_SR31 -> 0xc0
pSR32 = XGI330_SR32 -> 0xc0
SR25 = XGI330_sr25 -> 0 (we only use XGI330_sr25[0])

== Constant fields with 'dead' code: ==
pSoftSetting is set to XGI330_SoftSetting = 0x30
-> if (*pVBInfo->pSoftSetting & SoftDRAMType) is never true since
SoftDRAMType = 0x80
-> if (*pVBInfo->pSoftSetting & ModeSoftSetting) is never true since
ModeSoftSetting = 0x04
--> remove the code, remove pSoftSetting, remove XGI330_SoftSetting

pDVOSetting is set to XG21_DVOSetting = 0
-> if (((*pVBInfo->pDVOSetting) & 0xC0) == 0xC0) is never true
--> remove the code, remove pDVOSetting, remove XG21_DVOSetting

pXGINew_DRAMTypeDefinition is set to &XG40_DRAMTypeDefinition 0xFF
-> if (*pVBInfo->pXGINew_DRAMTypeDefinition != 0x0C) is always true
--> remove the if and remove pXGINew_DRAMTypeDefinition
remove XG40_DRAMTypeDefinition

== Replace pointer to unsigned char with unsigned char variable
and assign value of referenced pointer: ==
pSR21 -> SR21, remove XGI330_SR21
pSR22 -> SR22, remove XGI330_SR22
pXGINew_CR97 -> XGINew_CR97, remove XG20_CR97, XG27_CR97 and Z11m_CR97

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-13 17:15:43 -07:00
Peter Huewe 51f984bc06 staging/xgifb: Use SiS structs
This patch replaces some of the XGI internal structs by their
counterparts in the SiS driver.
XGI330_LVDSDataStruct -> SiS_LVDSData
XGI330_LCDDataStruct -> SiS_LCDData
XGI330_CHTVDataStruct -> SiS_LVDSData

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-13 17:15:43 -07:00
Peter Huewe 03f76fc617 staging/xgifb: Replace delay lookup tables with constant values
For TV Devices:
The values taken from XGI_TVDelayList are always overwritten with the
values from XGI_TVDelayList2 since the if condition for using the values
from XGI_TVDelayList2 is identical with the check to enter this scope and
thus always true.
The delay values in XGI_TVDelayList2 is always 0x22 so we
can simply replace it with this constant value.

For LCD Devices:
The LCD_DelayCompensation field is always set to 0x12 so we can simply
replace this field with a constant value.

This saves about 500 bytes in compiled size.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-13 17:15:43 -07:00
Peter Huewe 64e2498b6c staging/xgifb: Remove useless function XGI_CloseCRTC
Since XGI_CloseCRTC does not perform anything useful we can simply
remove it.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-13 17:15:42 -07:00
Peter Huewe 950725920a staging/xgifb: Simplyfy XGI_GetVCLK2Ptr a bit
This patch simplyfies the XGI_GetVCLK2Ptr a bit by moving the +=25 to
a define and removing statements without effect.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-13 17:15:42 -07:00
Peter Huewe f477d3e6bb staging/xgifb: Replace constant arrays with constant values
This patch removes the arrays in XGI_GetVCLK2Ptr which each contain only
one value four times and replaces them with their constant value.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-13 17:15:42 -07:00
Peter Huewe d6461e49c0 staging/xgifb: Remove unnecessary fields of XGINew_DDRDRAM_TYPE{340, 20}
Since the first three entries in XGINew_DDRDRAM_TYPE{340,20} are never
used, we can simply remove them;
and instead of passing XGINew_DDRDRAM_TYPE with an index we can simply
pass the value directly to XGINew_SetDRAMSize20Reg.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-13 17:15:42 -07:00
Peter Huewe 4e55d0b3ee staging/xgifb: Inline XGINew_SetDRAMSizingType
Since the function XGINew_SetDRAMSizingType is only called from one
location and consist only of 2 valuable lines we can simply inline it
here.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-13 17:15:41 -07:00
Peter Huewe 672f5ee27e staging/xgifb: Remove duplicated code from XGINew_DDRSizing340
Since XGINew_SetDRAMSize20Reg now handles both cases we can remove
the code duplication in XGINew_DDRSizing340.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-13 17:15:41 -07:00
Peter Huewe 391f695b90 staging/xgifb: Consolidate XGINew_SetDRAMSize{,20}Reg
This patch consolidates the almost identical functions
XGINew_SetDRAMSizeReg and XGINew_SetDRAMSize20Reg as they are
implemented identically except one division factor.

The changed factor is now reflected in the input data.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-13 17:15:41 -07:00
Peter Huewe f3ca589baf staging/xgifb: Remove superfluous header includes
This patch removes all unnecessary, redundant and superfluous header
includes from xgifb.

Tested on hp t5325 (XGI Z11)

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-13 17:14:49 -07:00
Peter Huewe ac326fb96b staging/xgifb: Add header #include guards to vb_table.h
This patch adds a simple #include guard to vb_table.h

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-13 17:13:22 -07:00
Peter Huewe 95649c425f staging/xgifb: Add mutext for fb_mmap locking
This adds a mutex for fb_mmap around smem_start and smem_len
so the mutex inside the fb_mmap() is actually used.  Changing of
these fields before calling the framebuffer_register() are not mutexed.

We check whether framebuffer_register has been called by reading
fbinfo->count.

See 537a1bf0 - "fbdev: add mutex for fb_mmap locking" by Krzysztof Helt
for details.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-13 17:13:22 -07:00
Peter Huewe 176f7842a8 staging/xgifb: Remove assignments without effect
This patch removes assignments to the fb_fix_screeninfo struct which are
overwritten by the memset in XGIfb_get_fix() a few lines later.
Since the name/id might be useful this was moved to XGIfb_get_fix().

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-13 17:13:21 -07:00
Anton Vorontsov 15d7644620 staging/android: Remove ram_console driver
All the functionality is now supported by pstore and pstore_ram drivers.

Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
Acked-by: Kees Cook <keescook@chromium.org>
Acked-by: Colin Cross <ccross@android.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-13 17:03:09 -07:00