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>
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>
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>
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>
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>
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>
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>
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.
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.
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.
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.
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.
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).
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>
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>
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>
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>
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>
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>
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>
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.
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>
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>