GitHub/mt8127/android_kernel_alcatel_ttab.git
13 years agostaging: et131x: Remove unused rx_ring.recv_buffer_pool
Mark Einon [Sun, 23 Oct 2011 09:22:43 +0000 (10:22 +0100)]
staging: et131x: Remove unused rx_ring.recv_buffer_pool

rx_ring.recv_buffer_pool is unused, even in the original driver code.
Remove from stuct, and also remove some comments regarding it.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: bcm: Fix three initialization errors in InterfaceDld.c
Kevin McKinney [Thu, 20 Oct 2011 12:15:23 +0000 (08:15 -0400)]
Staging: bcm: Fix three initialization errors in InterfaceDld.c

This patch fixes three initialization errors.
One is an incorrect initialization of a static
variable. The other two are incorrect
initializations in an if statement. These
errors were found by checkpatch.pl.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: bcm: Fix coding style issues in InterfaceDld.c
Kevin McKinney [Thu, 20 Oct 2011 12:15:22 +0000 (08:15 -0400)]
Staging: bcm: Fix coding style issues in InterfaceDld.c

This patch fixes multiple coding style issues in file,
InterfaceDld.c, found by checkpatch.pl.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:dac: Add AD5360 driver
Lars-Peter Clausen [Thu, 20 Oct 2011 08:46:38 +0000 (10:46 +0200)]
staging:iio:dac: Add AD5360 driver

This patch adds support for the Analog Devices AD5360, AD5361, AD5362, AD5363,
AD5370, AD5371, AD5372, AD5373 multi-channel digital-to-analog converters.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:trigger:bfin-timer: Fix compile error
Lars-Peter Clausen [Thu, 20 Oct 2011 12:38:43 +0000 (14:38 +0200)]
staging:iio:trigger:bfin-timer: Fix compile error

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: vt6655: add some range checks before memcpy()
Dan Carpenter [Thu, 20 Oct 2011 06:10:09 +0000 (09:10 +0300)]
Staging: vt6655: add some range checks before memcpy()

There were no range checks in the original code so the user could
write past the end of the array.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: vt6655: whitespace fixes to iotcl.c
Dan Carpenter [Thu, 20 Oct 2011 06:09:46 +0000 (09:09 +0300)]
Staging: vt6655: whitespace fixes to iotcl.c

The indents didn't line up at all in the original code.  I also fixed
a bunch of other white issues as I went along.  I changed the comment
style and removed some commented out code.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: vt6656: add some range checks before memcpy()
Dan Carpenter [Thu, 20 Oct 2011 06:10:39 +0000 (09:10 +0300)]
Staging: vt6656: add some range checks before memcpy()

We need to verify that we're not writing past the end of the array.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: vt6656: whitespace cleanups in ioctl.c
Dan Carpenter [Thu, 20 Oct 2011 06:10:25 +0000 (09:10 +0300)]
Staging: vt6656: whitespace cleanups in ioctl.c

The indents on this file didn't line up so it was hard to work with.
I changed other white space issues as I came across them.  I also
deleted or changed some couple comments and the comment style.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: et131x: Remove unused defines
Mark Einon [Thu, 20 Oct 2011 00:18:48 +0000 (01:18 +0100)]
staging: et131x: Remove unused defines

Some defines are no longer referenced in the code, so removed them.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: et131x: Convert rest of pci memory management to dma api
Mark Einon [Thu, 20 Oct 2011 00:18:47 +0000 (01:18 +0100)]
staging: et131x: Convert rest of pci memory management to dma api

Replaced pci map/unmap and set_mask calls with their dma equivalents.
Also updated comments to reflect this.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: et131x: on transmit, stop the queue if the next packet will fail
Mark Einon [Thu, 20 Oct 2011 00:18:46 +0000 (01:18 +0100)]
staging: et131x: on transmit, stop the queue if the next packet will fail

* Currently the tx queue is only stopped when the current packet fails.
Check if the next packet will fail, and stop the queue if so.

* Removed associated item from TODO list in the README.

* Also minor fixup as adapter was being declared as null and immediately set
to a value.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: et131x: Tidy up PCI device table definition
Mark Einon [Thu, 20 Oct 2011 00:18:45 +0000 (01:18 +0100)]
staging: et131x: Tidy up PCI device table definition

Used the convenience macros DEFINE_PCI_DEVICE_TABLE and PCI_VDEVICE to
tidy up the device table definition.

Also remove the corresponding TODO item from the README.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: et131x: Match dma_alloc_ calls with dma_free_ calls
Mark Einon [Thu, 20 Oct 2011 00:18:44 +0000 (01:18 +0100)]
staging: et131x: Match dma_alloc_ calls with dma_free_ calls

Previous update was to replace pci_alloc with dma_alloc calls. I missed
replacing the corresponding pci_free_ calls with the dma versions. Now
done. Thanks to Denis Kirjanov <kirjanov@gmail.com> for pointing this
out.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: et131x: use dma_alloc... instead of pci_alloc...
Mark Einon [Thu, 20 Oct 2011 00:18:43 +0000 (01:18 +0100)]
staging: et131x: use dma_alloc... instead of pci_alloc...

Use dma_allocs instead of pci_allocs, so we can use GFP_KERNEL
allocations.

Also removed this item from the TODO list

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: et131x: Fix issues when USE_FBR0 is not defined
Mark Einon [Thu, 20 Oct 2011 00:18:42 +0000 (01:18 +0100)]
staging: et131x: Fix issues when USE_FBR0 is not defined

* Following on from making rx_ring.fbr use a common structure - reversed
the fbr[] array indicies so that index 1 = FBR0 and index 0 = FBR1,
which allows USE_FBR0 define to work.

* Also fixed up minor issues where indexes into the array were out of
bounds in some places.

* Removed rx_ring.fbr common stuct TODO item from README

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: et131x: Make rx_ring.fbr{0,1} share a common structure
Mark Einon [Thu, 20 Oct 2011 00:18:41 +0000 (01:18 +0100)]
staging: et131x: Make rx_ring.fbr{0,1} share a common structure

Sharing a common structure by moving common structure items into
fbr_lookup.

TODO - Currently will not work if USE_FBR0 = 0 as FBR1 uses fbr[1]
which is removed in this case

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: et131x: Moving two extern inline functions to .c file
Mark Einon [Thu, 20 Oct 2011 00:18:40 +0000 (01:18 +0100)]
staging: et131x: Moving two extern inline functions to .c file

Two helper functions for adding 10bit/12bit umbers with wrapping are
defined in the header. Moved them to the driver .c file.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: et131x: Update TODO list - remove 'put driver into single file'
Mark Einon [Thu, 20 Oct 2011 00:18:39 +0000 (01:18 +0100)]
staging: et131x: Update TODO list - remove 'put driver into single file'

Driver now resides in a single file with a separate header with
registers, updated the README TODO list.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: et131x: move et1310_tx.h contents into et131x.c
Mark Einon [Thu, 20 Oct 2011 00:18:38 +0000 (01:18 +0100)]
staging: et131x: move et1310_tx.h contents into et131x.c

Move et1310_tx.h contents into et131x.c and delete et1310_tx.h

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: et131x: move et1310_rx.h contents into et131x.c
Mark Einon [Thu, 20 Oct 2011 00:18:37 +0000 (01:18 +0100)]
staging: et131x: move et1310_rx.h contents into et131x.c

Move et1310_rx.h contents into et131x.c and delete et1310_rx.h

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: et131x: move et131x_defs.h contents into et131x.c
Mark Einon [Thu, 20 Oct 2011 00:18:36 +0000 (01:18 +0100)]
staging: et131x: move et131x_defs.h contents into et131x.c

Move et131x_defs.h contents into et131x.c and delete et131x_defs.h

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: et131x: move et131x_adapter.h contents into et131x.c
Mark Einon [Thu, 20 Oct 2011 00:18:35 +0000 (01:18 +0100)]
staging: et131x: move et131x_adapter.h contents into et131x.c

Move et131x_adapter.h contents into et131x.c and delete et131x_adapter.h

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: et131x: move et1310_phy.h contents into et131x.h
Mark Einon [Thu, 20 Oct 2011 00:18:34 +0000 (01:18 +0100)]
staging: et131x: move et1310_phy.h contents into et131x.h

Move et1310_phy.h register defines into et131x.h and delete
et1310_phy.h

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: et131x: move et1310_address_map.h contents into et131x.h
Mark Einon [Thu, 20 Oct 2011 00:18:33 +0000 (01:18 +0100)]
staging: et131x: move et1310_address_map.h contents into et131x.h

Move et1310_address_map.h register defines into et131x.h and delete
et1310_address_map.h

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: et131x: Move non-register defines from et131x.h to et131x.c
Mark Einon [Thu, 20 Oct 2011 00:18:32 +0000 (01:18 +0100)]
staging: et131x: Move non-register defines from et131x.h to et131x.c

Header file should only have register defines, moved non-register
defines to et131x.c

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: et131x: Move function declarations from et131x.h to et131x.c
Mark Einon [Thu, 20 Oct 2011 00:18:31 +0000 (01:18 +0100)]
staging: et131x: Move function declarations from et131x.h to et131x.c

The function declarations in et131x.h are no longer used now all
functions are in one file. Removed declarations from et131x.h and
added any required forward declarations to et131x.c.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: et131x: Put all .c files into one big file
Mark Einon [Thu, 20 Oct 2011 00:18:30 +0000 (01:18 +0100)]
staging: et131x: Put all .c files into one big file

Created one big .c file for the driver, moving the contents of all
driver .c files into it.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:dac:ad5686: Check for negative values
Lars-Peter Clausen [Wed, 19 Oct 2011 15:51:28 +0000 (17:51 +0200)]
staging:iio:dac:ad5686: Check for negative values

Currently it is possible to write negative values to the ad5686's raw attribute.
This will cause undefined behaviour, so reject negative values.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:dac:ad5791: Fix scale unit
Lars-Peter Clausen [Wed, 19 Oct 2011 15:47:52 +0000 (17:47 +0200)]
staging:iio:dac:ad5791: Fix scale unit

Scale is currently reported in volts instead of millivolts. This patch fixes it.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:dac:ad5791: Convert attributes to new naming spec
Lars-Peter Clausen [Wed, 19 Oct 2011 15:47:51 +0000 (17:47 +0200)]
staging:iio:dac:ad5791: Convert attributes to new naming spec

Add the missing "voltage" chan_type to the powerdown attributes.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:dac:ad5791: Allow asymmetrical reference voltages
Lars-Peter Clausen [Wed, 19 Oct 2011 15:47:50 +0000 (17:47 +0200)]
staging:iio:dac:ad5791: Allow asymmetrical reference voltages

The ad5791 currently assumes that the negative and positive supply have the
same absolute value, which is not necessarily true. This patch introduces a
offset attribute which will contain the negative supply voltage scaled
according to the iio spec. The raw attribute now accepts values in the range
of 0 to max instead of -max/2 to max/2.

While we are at it also fix the vref span calculation. Since both positive and
negative reference voltages are specificed as absolute values we need to add
them and not subtract them to get the reference voltage span.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:dac:ad5791: Use correct DAC bit-size
Lars-Peter Clausen [Wed, 19 Oct 2011 15:47:49 +0000 (17:47 +0200)]
staging:iio:dac:ad5791: Use correct DAC bit-size

Commit c5b99396 ("staging:iio:dac:ad5791 chan spec conversion.") introduced a
small bug, using storagebits instead of realbits throughout the driver, which
causes the driver to work incorrectly. This patch fixes it.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoiio: cdc: Fix pushed event code - Typo, should be IIO_CAPACITANCE.
Michael Hennerich [Wed, 19 Oct 2011 12:41:08 +0000 (14:41 +0200)]
iio: cdc: Fix pushed event code - Typo, should be IIO_CAPACITANCE.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoiio: adc: Relocate Capacitance to Digital Converters (CDC) into own subdir
Michael Hennerich [Wed, 19 Oct 2011 11:02:03 +0000 (13:02 +0200)]
iio: adc: Relocate Capacitance to Digital Converters (CDC) into own subdir

No functional changes.
Fix Kconfig description.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoiio: Spell fix - consistent use of Converter - no functional changes
Michael Hennerich [Wed, 19 Oct 2011 09:17:53 +0000 (11:17 +0200)]
iio: Spell fix - consistent use of Converter - no functional changes

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:dac: Add AD5064 driver
Lars-Peter Clausen [Tue, 18 Oct 2011 07:33:03 +0000 (09:33 +0200)]
staging:iio:dac: Add AD5064 driver

This patch adds support for the Analog Devices AD6064, AD6064-1, AD6044, AD6024
quad channel digital-to-analog converter devices.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: tidspbridge: MMU2 registers are limited to 32-bit data access
Vladimir Zapolskiy [Wed, 19 Oct 2011 19:39:12 +0000 (22:39 +0300)]
staging: tidspbridge: MMU2 registers are limited to 32-bit data access

According to OMAP3 TRM access to MMU registers shall be strictly 32-bit
aligned.

Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
Acked-by: Omar Ramirez Luna <omar.ramirez@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: vt6655: memory corruption in check in wpa_set_wpadev()
Dan Carpenter [Tue, 18 Oct 2011 06:27:25 +0000 (09:27 +0300)]
Staging: vt6655: memory corruption in check in wpa_set_wpadev()

The original code left it up to the user to decide how much data to
copy, but that doesn't work with a fixed size array.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: rtl8192u: ieee80211: Makefile: remove unneeded stuff
Greg Kroah-Hartman [Tue, 18 Oct 2011 20:36:18 +0000 (13:36 -0700)]
Staging: rtl8192u: ieee80211: Makefile: remove unneeded stuff

There's a lot of unused and unneeded things in this makefile, so delete
it all.

Reported-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: wlags49_h25: Makefile: remove unneeded stuff
Greg Kroah-Hartman [Tue, 18 Oct 2011 20:36:04 +0000 (13:36 -0700)]
Staging: wlags49_h25: Makefile: remove unneeded stuff

There's a lot of unused and unneeded things in this makefile, so delete
it all.

Reported-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: wlags49_h2: Makefile: remove unneeded stuff
Greg Kroah-Hartman [Tue, 18 Oct 2011 20:34:59 +0000 (13:34 -0700)]
Staging: wlags49_h2: Makefile: remove unneeded stuff

There's a lot of unused and unneeded things in this makefile, so delete
it all.

Reported-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: mei: clean the TODO file from done tasks.
Oren Weil [Mon, 17 Oct 2011 06:06:17 +0000 (08:06 +0200)]
staging: mei: clean the TODO file from done tasks.

1) We move the AMT Watchdog to use the kernel watchdog core.
the new code is still part of the MEI driver.
we didn't find any good reason to extract the the MEI driver watchdog code
from the MEI Driver to a new module.

2) Since the watchdog remains in the mei driver, exposing in-kernel
API just for AMTHI is unnecessary.

MEI new Watchdog Core Interface Patches set:
https://lkml.org/lkml/2011/9/7/26

3) Code cleanup (init and probe, bug_on usage, headers and etc) was
submitted in previous patches.

Patches:
https://lkml.org/lkml/2011/9/21/231
https://lkml.org/lkml/2011/6/15/358
https://lkml.org/lkml/2011/7/7/177
https://lkml.org/lkml/2011/9/7/38
https://lkml.org/lkml/2011/9/7/37
https://lkml.org/lkml/2011/9/7/28

4) mei.txt was updated with additional information.

Patch:
https://lkml.org/lkml/2011/10/16/52

Acked-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Oren Weil <oren.jer.weil@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: vme_user: rename USER_BUS_MAX to VME_USER_BUS_MAX
Manohar Vanga [Mon, 26 Sep 2011 09:27:18 +0000 (11:27 +0200)]
staging: vme_user: rename USER_BUS_MAX to VME_USER_BUS_MAX

Signed-off-by: Manohar Vanga <manohar.vanga@cern.ch>
Cc: Martyn Welch <martyn.welch@ge.com>
Reviewed-by: Emilio G. Cota <cota@braap.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: vme: get rid of struct vme_device_id and slots
Manohar Vanga [Mon, 26 Sep 2011 09:27:17 +0000 (11:27 +0200)]
staging: vme: get rid of struct vme_device_id and slots

Previously, the device-driver matching mechanism depended on the
vme_device_id structure due to the need for a bind table per driver.
This method of matching is no longer used so this patch merges the
fields of struct vme_device_id into struct vme_dev. Since this also
renders the slot field meaningless, it has also been removed in this
patch.

Signed-off-by: Manohar Vanga <manohar.vanga@cern.ch>
Cc: Martyn Welch <martyn.welch@ge.com>
Reviewed-by: Emilio G. Cota <cota@braap.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: vme: make match() driver specific to improve non-VME64x support
Manohar Vanga [Mon, 26 Sep 2011 09:27:16 +0000 (11:27 +0200)]
staging: vme: make match() driver specific to improve non-VME64x support

For jumper based boards (non VME64x), there is no mechanism
for detecting the card that is plugged into a specific slot. This
leads to issues in non-autodiscovery crates/cards when a card is
plugged into a slot that is "claimed" by a different driver. In
reality, there is no problem, but the driver rejects such a
configuration due to its dependence on the concept of slots.

This patch makes the concept of slots less critical and pushes the
driver match() to individual drivers (similar to what happens in the
ISA bus in driver/base/isa.c). This allows drivers to register the
number of devices that they expect without any restrictions. Devices
in this new model are now formatted as $driver_name-$bus_id.$device_id
(as compared to the earlier vme-$bus_id.$slot_number).

This model also makes the device model more logical as devices
are only registered when they actually exist whereas earlier,
a set of devices were being created automatically regardless of
them actually being there.

Another change introduced in this patch is that devices are now created
within the VME driver structure rather than in the VME bridge structure.
This way, things don't go haywire if the bridge driver is removed while
a driver is using it.

Signed-off-by: Manohar Vanga <manohar.vanga@cern.ch>
Cc: Martyn Welch <martyn.welch@ge.com>
Reviewed-by: Emilio G. Cota <cota@braap.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: vme: add struct vme_dev for VME devices
Manohar Vanga [Mon, 26 Sep 2011 09:27:15 +0000 (11:27 +0200)]
staging: vme: add struct vme_dev for VME devices

Instead of using a vanilla 'struct device' for VME devices, add new
'struct vme_dev'. Modifications have been made to the VME framework
API as well as all in-tree VME drivers.

The new vme_dev structure has the following advantages from the
current model used by the driver:

    * Driver functions (probe, remove) now receive a VME device
      instead of a pointer to the bridge device (cleaner design)
    * It's easier to differenciate API calls as bridge-based or
      device-based (ie. cleaner interface).

Signed-off-by: Manohar Vanga <manohar.vanga@cern.ch>
Cc: Martyn Welch <martyn.welch@ge.com>
Reviewed-by: Emilio G. Cota <cota@braap.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:dummy Add buffered reading support
Jonathan Cameron [Fri, 14 Oct 2011 15:34:15 +0000 (16:34 +0100)]
staging:iio:dummy Add buffered reading support

Very simple buffered reading.  Did not provide a trigger as
the sysfs trigger already meets that requirement.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:dummy Add event support + fake event generator
Jonathan Cameron [Fri, 14 Oct 2011 15:34:14 +0000 (16:34 +0100)]
staging:iio:dummy Add event support + fake event generator

The event generator is not very pretty but does the job and
allows this driver to look a lot more like a normal driver
than it otherwise would.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:Documentation Simple dummy driver to explain the basics
Jonathan Cameron [Fri, 14 Oct 2011 15:34:13 +0000 (16:34 +0100)]
staging:iio:Documentation Simple dummy driver to explain the basics

The documenation explaining how to go about writing a driver is lagging
horribly, so here is another approach; an actual driver with
lots of explanatory comments.

Note it is currently minimal in that there are no events and no
buffer.  With care they can probably be added in additional files
without messing up the clarity of what we have here.

V2: Addressed some of Manuel Stahl's feedback.

Fixed up kernel doc.
Added more general description.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:adc:max1363 incorrect allocation of available_scanmasks
Jonathan Cameron [Fri, 14 Oct 2011 13:46:59 +0000 (14:46 +0100)]
staging:iio:adc:max1363 incorrect allocation of available_scanmasks

Longs are not known for being 8 bits.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio: fix removal path to allow correct freeing.
Jonathan Cameron [Fri, 14 Oct 2011 13:46:58 +0000 (14:46 +0100)]
staging:iio: fix removal path to allow correct freeing.

Fix a dumb lack of consideration of the effect of combining
the iio_device_unregister and iio_free_device calls into
one.  There is no valid place to free some of the sysfs
array elements.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoiio: adc: remove ADT75 driver - hwmon/lm75 will take over ADT75 support
Michael Hennerich [Fri, 14 Oct 2011 07:00:44 +0000 (09:00 +0200)]
iio: adc: remove ADT75 driver - hwmon/lm75 will take over ADT75 support

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio: gpio build dependency fixing
Jonathan Cameron [Wed, 12 Oct 2011 09:57:33 +0000 (10:57 +0100)]
staging:iio: gpio build dependency fixing

Numerous drivers either had pointless includes of gpio.h
or should have been dependent on GENERIC_GPIO and were not.
Conversion of ads1210 to use array registration triggered
build failures that highlighted all was not well.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Reported-by: Randy Dunlap <rdunlap@xenotime.net>
Acked-by: Randy Dunlap <rdunlap@xenotime.net>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: hv: storvsc: Fix checkpatch warnings
K. Y. Srinivasan [Sat, 15 Oct 2011 04:31:57 +0000 (21:31 -0700)]
Staging: hv: storvsc: Fix checkpatch warnings

Fix checkpatch warnings.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: hv: mousevsc: Fix a checkpatch warning
K. Y. Srinivasan [Sat, 15 Oct 2011 04:31:56 +0000 (21:31 -0700)]
Staging: hv: mousevsc: Fix a checkpatch warning

Fix a checkpatch warning.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: drop unused Kconfig symbols
Paul Bolle [Fri, 14 Oct 2011 12:30:58 +0000 (14:30 +0200)]
staging: drop unused Kconfig symbols

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: zcache: remove zcache_direct_reclaim_lock
Seth Jennings [Wed, 12 Oct 2011 19:41:00 +0000 (14:41 -0500)]
staging: zcache: remove zcache_direct_reclaim_lock

zcache_do_preload() currently does a spin_trylock() on the
zcache_direct_reclaim_lock. Holding this lock intends to prevent
shrink_zcache_memory() from evicting zbud pages as a result
of a preload.

However, it also prevents two threads from
executing zcache_do_preload() at the same time.  The first
thread will obtain the lock and the second thread's spin_trylock()
will fail (an aborted preload) causing the page to be either lost
(cleancache) or pushed out to the swap device (frontswap). It
also doesn't ensure that the call to shrink_zcache_memory() is
on the same thread as the call to zcache_do_preload().

Additional, there is no need for this mechanism because all
zcache_do_preload() calls that come down from cleancache already
have PF_MEMALLOC set in the process flags which prevents
direct reclaim in the memory manager. If the zcache_do_preload()
call is done from the frontswap path, we _want_ reclaim to be
done (which it isn't right now).

This patch removes the zcache_direct_reclaim_lock and related
statistics in zcache.

Based on v3.1-rc8

Signed-off-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Reviewed-by: Dave Hansen <dave@linux.vnet.ibm.com>
Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging/nvec: fix compilation error in nvec.c
Marc Dietrich [Mon, 10 Oct 2011 09:35:45 +0000 (11:35 +0200)]
staging/nvec: fix compilation error in nvec.c

This fixes a compilation error in nvec.c due to the missing module.h include.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
Cc: Julian Andres Klode <jak@jak-linux.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging/easycap: kill timeval members of easycap struct
Tomas Winkler [Mon, 10 Oct 2011 06:36:38 +0000 (08:36 +0200)]
staging/easycap: kill timeval members of easycap struct

timeval[0-9] were not used or used in a ready only code
so we can remove them safely and so the code

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: wlags49_h2: Fixup SIOCSIWGENIE
David Kilroy [Sun, 9 Oct 2011 11:11:37 +0000 (12:11 +0100)]
staging: wlags49_h2: Fixup SIOCSIWGENIE

Setting the key management scheme is done in SIOCSIWAUTH, so
no need to do anything in SIOCSIWGENIE.

Fix up function name.

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: wlags49_h2: Fixup IW_AUTH handling
David Kilroy [Sun, 9 Oct 2011 11:11:36 +0000 (12:11 +0100)]
staging: wlags49_h2: Fixup IW_AUTH handling

Handle more cases in IW_AUTH.

Avoid reporting errors (invalid parameter) on operations that we
can't do anything with.

Return -EINPROGRESS from some operations to get wpa_supplicant to
batch and commit changes.

In other operations apply the changes immediately.

Avoid writing WEP keys from the commit handler when WEP is not
being used.

Accept WPA_VERSION_DISABLED, which is received from wpa_supplicant
during WEP.

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: wlags49_h2: Make key setting more reliable
David Kilroy [Sun, 9 Oct 2011 11:11:35 +0000 (12:11 +0100)]
staging: wlags49_h2: Make key setting more reliable

Share logic between encodeext and encode, so that we can handle
subtle differences between them (implied set_tx), and clear the
appropriate keys if you attempt to switch straight from WPA to
WEP and vice versa.

Also reinstate the TX buffer flush, and ensure the key index is
written to the card little endian.

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: wlags49_h2: Report WPA IE in scan results with IWEVGENIE
David Kilroy [Sun, 9 Oct 2011 11:11:34 +0000 (12:11 +0100)]
staging: wlags49_h2: Report WPA IE in scan results with IWEVGENIE

Report the IE using the appropriate event instead of a custom one.

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: wlags49_h2: Remove useless IWE_STREAM_ADD_XXX defines
David Kilroy [Sun, 9 Oct 2011 11:11:33 +0000 (12:11 +0100)]
staging: wlags49_h2: Remove useless IWE_STREAM_ADD_XXX defines

These macros don't map to anything different. Just remove them.

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: wlags49_h2: Enable WPA in the HCF
David Kilroy [Sun, 9 Oct 2011 11:11:32 +0000 (12:11 +0100)]
staging: wlags49_h2: Enable WPA in the HCF

WPA has been disabled in the HCF layer. The firmware does
support it (it is used on other platforms). Enable it so
we can work through the issues.

Note that we also enable this for the HERMES 2.5 non-WARP
firmware cards.

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: wlags49_h2: Handle sysfs_create_group return correctly
David Kilroy [Sun, 9 Oct 2011 11:11:31 +0000 (12:11 +0100)]
staging: wlags49_h2: Handle sysfs_create_group return correctly

The function returns 0 on success and non-zero on error. So
correctly record the status so it is freed appropriately.

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agodrivers: staging: rts_pstor fixed checkpatch warnings
Pelle Windestam [Mon, 10 Oct 2011 17:41:42 +0000 (19:41 +0200)]
drivers: staging: rts_pstor fixed checkpatch warnings

Fixed the checkpatch warnings in rtsx.c/.h, mostly braces and spaces
before tabs issues. Also fixed warning about not using
DEFINE_PCI_DEVICE_TABLE(...) macro.

Signed-off-by: Pelle Windestam <pelle@windestam.se>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:rts_pstor:Fix SDIO issue
wwang [Mon, 10 Oct 2011 06:47:08 +0000 (14:47 +0800)]
staging:rts_pstor:Fix SDIO issue

Fix a bug that SDIO and SD normal card would appear simultaneously if a SDIO card inserted.

Signed-off-by: wwang <wei_wang@realsil.com.cn>
Acked-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: comedi: fix brace coding style issue in ni_atmio.c
Jake Burton [Mon, 10 Oct 2011 16:02:24 +0000 (17:02 +0100)]
Staging: comedi: fix brace coding style issue in ni_atmio.c

This is a patch to the ni_atmio.c file which fixes a brace and whitespace warning found by the checkpatch.pl tool

Signed-off-by: Jake Burton <jake5991@live.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: comedi: c6xdigio: fixed missing KERN_* in printk
Nasir Abed [Mon, 10 Oct 2011 10:09:52 +0000 (12:09 +0200)]
Staging: comedi: c6xdigio: fixed missing KERN_* in printk

Fixed missing KERN_* in printk statements.

Signed-off-by: Nasir Abed <nasirabed+kernel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: xgifb: clean up 2nd display state
Aaro Koskinen [Tue, 11 Oct 2011 18:47:37 +0000 (21:47 +0300)]
staging: xgifb: clean up 2nd display state

Convert the display type to enum and rename disp_state to display2.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: xgifb: delete CRT1 state
Aaro Koskinen [Tue, 11 Oct 2011 18:47:36 +0000 (21:47 +0300)]
staging: xgifb: delete CRT1 state

The driver does not need to manage CRT1 state.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: xgifb: make DAC tables const
Aaro Koskinen [Tue, 11 Oct 2011 18:47:35 +0000 (21:47 +0300)]
staging: xgifb: make DAC tables const

DAC tables are read-only and can be made const.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: xgifb: make RAM type tables const
Aaro Koskinen [Tue, 11 Oct 2011 18:47:34 +0000 (21:47 +0300)]
staging: xgifb: make RAM type tables const

RAM type tables are read-only and can be made const.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: xgifb: move XGINew_DataBusWidth into vb_device_info
Aaro Koskinen [Tue, 11 Oct 2011 18:47:33 +0000 (21:47 +0300)]
staging: xgifb: move XGINew_DataBusWidth into vb_device_info

Move the memory bus width info to vb_device_info.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: xgifb: move XGINew_ChannelAB into vb_device_info
Aaro Koskinen [Tue, 11 Oct 2011 18:47:32 +0000 (21:47 +0300)]
staging: xgifb: move XGINew_ChannelAB into vb_device_info

Move the memory channel info into vb_device_info.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: xgifb: move XGINew_RAMType into vb_device_info
Aaro Koskinen [Tue, 11 Oct 2011 18:47:31 +0000 (21:47 +0300)]
staging: xgifb: move XGINew_RAMType into vb_device_info

The RAM type is device specific, so move it into vb_device_info.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: xgifb: eliminate global XGI_Pr data
Aaro Koskinen [Tue, 11 Oct 2011 18:47:30 +0000 (21:47 +0300)]
staging: xgifb: eliminate global XGI_Pr data

Move vb_device_info into xgifb_video_info.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: xgifb: make XGIbios_mode const
Aaro Koskinen [Tue, 11 Oct 2011 18:47:29 +0000 (21:47 +0300)]
staging: xgifb: make XGIbios_mode const

Comments are wrong, the table is read-only and can be made const.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: xgifb: eliminate filter_tb global variable
Aaro Koskinen [Tue, 11 Oct 2011 18:47:28 +0000 (21:47 +0300)]
staging: xgifb: eliminate filter_tb global variable

filter_tb is only used inside a single function, and it does not need
to be static.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: xgifb: eliminate XGIfb_fix
Aaro Koskinen [Tue, 11 Oct 2011 18:47:27 +0000 (21:47 +0300)]
staging: xgifb: eliminate XGIfb_fix

Eliminate XGIfb_fix and initialize needed fields of fb_info->fix
in probe().

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: xgifb: eliminate default_var
Aaro Koskinen [Tue, 11 Oct 2011 18:47:26 +0000 (21:47 +0300)]
staging: xgifb: eliminate default_var

Eliminate default_var and initialize needed fields of fb_info->var
in probe().

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: xgifb: eliminate XGIfb_CRT2_write_enable variable
Aaro Koskinen [Tue, 11 Oct 2011 18:47:25 +0000 (21:47 +0300)]
staging: xgifb: eliminate XGIfb_CRT2_write_enable variable

Replace XGIfb_CRT2_write_enable with IND_XGI_CRT2_WRITE_ENABLE_315.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: xgifb: move pseudo_palette into xgifb_video_info
Aaro Koskinen [Tue, 11 Oct 2011 18:47:24 +0000 (21:47 +0300)]
staging: xgifb: move pseudo_palette into xgifb_video_info

pseudo_palette should be dynamically allocated for each fb.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: xgifb: move XGIfb_rate_idx into xgifb_video_info
Aaro Koskinen [Tue, 11 Oct 2011 18:47:23 +0000 (21:47 +0300)]
staging: xgifb: move XGIfb_rate_idx into xgifb_video_info

The current refresh rate index should be stored in the device-specific
data allocated in probe().

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: xgifb: move xgifb_mode_idx into xgifb_video_info
Aaro Koskinen [Tue, 11 Oct 2011 18:47:22 +0000 (21:47 +0300)]
staging: xgifb: move xgifb_mode_idx into xgifb_video_info

The current mode index should be stored in the device-specific data
allocated in probe().

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: xgifb: eliminate XGIfb_mode_no
Aaro Koskinen [Tue, 11 Oct 2011 18:47:21 +0000 (21:47 +0300)]
staging: xgifb: eliminate XGIfb_mode_no

We can get the information from the table with mode index.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: xgifb: dynamically allocate xgifb_video_info
Aaro Koskinen [Tue, 11 Oct 2011 18:47:20 +0000 (21:47 +0300)]
staging: xgifb: dynamically allocate xgifb_video_info

Delete global xgi_video_info and dynamically allocate the data.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: xgifb: avoid direct references xgi_video_info
Aaro Koskinen [Tue, 11 Oct 2011 18:47:19 +0000 (21:47 +0300)]
staging: xgifb: avoid direct references xgi_video_info

Avoid direct references to global xgi_video_info. This will help changing
the data from statically allocated to dynamically allocated.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: xgifb: rename struct video_info to xgifb_video_info
Aaro Koskinen [Tue, 11 Oct 2011 18:47:18 +0000 (21:47 +0300)]
staging: xgifb: rename struct video_info to xgifb_video_info

Rename struct video_info to xgifb_video_info.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: xgifb: add a global variable for the default refresh rate
Aaro Koskinen [Tue, 11 Oct 2011 18:47:17 +0000 (21:47 +0300)]
staging: xgifb: add a global variable for the default refresh rate

Add a global variable for the default refresh rate. This is done to
get rid of references to xgi_video_info before the probe routine, which
should allocate the xgi_video_info dynamically in the future.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: xgifb: inline XGIfb_query_VGA_config_space()
Aaro Koskinen [Tue, 11 Oct 2011 18:47:16 +0000 (21:47 +0300)]
staging: xgifb: inline XGIfb_query_VGA_config_space()

XGIfb_query_VGA_config_space() is used only once during the init and
can be replaced with a single PCI configuration space read.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: xgifb: eliminate global XGIhw_ext data
Aaro Koskinen [Tue, 11 Oct 2011 18:47:15 +0000 (21:47 +0300)]
staging: xgifb: eliminate global XGIhw_ext data

Move xgi_hw_device_info into xgi_video_info.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: xgifb: eliminate global fb_info variable
Aaro Koskinen [Tue, 11 Oct 2011 18:47:14 +0000 (21:47 +0300)]
staging: xgifb: eliminate global fb_info variable

Move fb_info into xgi_video_info.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: xgifb: use PCI drvdata
Aaro Koskinen [Tue, 11 Oct 2011 18:47:13 +0000 (21:47 +0300)]
staging: xgifb: use PCI drvdata

Don't access the global xgi_video_info directly in xgifb_remove().

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: zcache: reduce tmem bucket lock contention
Seth Jennings [Tue, 4 Oct 2011 13:21:32 +0000 (08:21 -0500)]
staging: zcache: reduce tmem bucket lock contention

tmem uses hash buckets each with their own rbtree and lock to
quickly lookup tmem objects.  tmem has TMEM_HASH_BUCKETS (256)
buckets per pool.  However, because of the way the tmem_oid is
generated for frontswap pages, only 16 unique tmem_oids are being
generated, resulting in only 16 of the 256 buckets being used.
This cause high lock contention for the per bucket locks.

This patch changes SWIZ_BITS to include more bits of the offset.
The result is that all 256 hash buckets are potentially used resulting in a
95% drop in hash bucket lock contention.

Signed-off-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: remove brcm80211 driver from the staging tree
Arend van Spriel [Fri, 7 Oct 2011 14:24:40 +0000 (16:24 +0200)]
staging: brcm80211: remove brcm80211 driver from the staging tree

With the mainline patch being applied to the wireless-next repository
by John Linville this driver is no longer needed under the staging
directory. This patch ends its life under the staging tree.

Cc: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: bcm: Fix coding style issues in InterfaceMisc.c
Kevin McKinney [Tue, 11 Oct 2011 01:01:50 +0000 (21:01 -0400)]
Staging: bcm: Fix coding style issues in InterfaceMisc.c

This patch cleans up several code style issues found
in InterfaceMisc.c reported by checkpatch.pl.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: bcm: Remove assignment from if conditions reported by checkpatch.pl
Kevin McKinney [Tue, 11 Oct 2011 01:01:49 +0000 (21:01 -0400)]
Staging: bcm: Remove assignment from if conditions reported by checkpatch.pl

This patch removes an assignment from three if
conditions.  In all three cases, the line of code was
attempting to allocate memory, and check
if the memory was allocated in the if statement.
This issue was reported by checkpatch.pl.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>