]> git.karo-electronics.de Git - linux-beck.git/log
linux-beck.git
13 years agoStaging: batman-adv: Remove hashdata_choose_cb from hash
Sven Eckelmann [Sun, 21 Nov 2010 23:55:57 +0000 (00:55 +0100)]
Staging: batman-adv: Remove hashdata_choose_cb from hash

Function pointers cannot be inlined by a compiler and thus always has
the overhead of an call. hashdata_choose_cb's are one of the most often
called function pointers and its overhead must kept relative low.

As first step, every function which uses this function pointer takes it
as parameter instead of storing it inside the hash abstraction
structure.

This not generate any performance gain right now. The called functions
must also be able to be inlined by the calling functions to enable
inlining of the function pointer.

Reported-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: batman-adv: Remove hashdata_compare_cb from hash
Sven Eckelmann [Sun, 21 Nov 2010 23:55:56 +0000 (00:55 +0100)]
Staging: batman-adv: Remove hashdata_compare_cb from hash

Function pointers cannot be inlined by a compiler and thus always has
the overhead of an call. hashdata_compare_cb's are one of the most often
called function pointers and its overhead must kept relative low.

As first step, every function which uses this function pointer takes it
as parameter instead of storing it inside the hash abstraction
structure.

This not generate any performance gain right now. The called functions
must also be able to be inlined by the calling functions to enable
inlining of the function pointer.

Reported-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: batman-adv: Make hop_penalty configurable via sysfs
Linus Lüssing [Sun, 21 Nov 2010 23:55:55 +0000 (00:55 +0100)]
Staging: batman-adv: Make hop_penalty configurable via sysfs

When having a mixed topology of both very mobile and rather static
nodes, you are usually best advised to set the originator interval on
all nodes to a level best suited for the most mobile node.

However, if most of the nodes are rather static, this can create a lot
of undesired overhead as a trade-off then. If setting the interval too
low on the static nodes, a mobile node might be chosen as a router for
too long, not switching away from it fast enough because of its
mobility and the low frequency of ogms of static nodes.

Exposing the hop_penalty is especially useful for the stated scenario: A
static node can keep the default originator interval, a mobile node can
select a quicker one resulting in faster route updates towards this
mobile node. Additionally, such a mobile node could select a higher hop
penalty (or even set it to 255 to disable acting as a router for other
nodes) to make it less desirable, letting other nodes avoid selecting
this mobile node as a router.

Signed-off-by: Linus Lüssing <linus.luessing@ascom.ch>
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: batman-adv: Ommit storing struct device in sysfs functions
Linus Lüssing [Sun, 21 Nov 2010 23:55:54 +0000 (00:55 +0100)]
Staging: batman-adv: Ommit storing struct device in sysfs functions

We actually do not need an extra struct device variable, therefore
replacing them with defines that directly get the bat_priv or
net_device. This further reduces the code size in bat_sysfs.c and
especially shortens some macros.

Signed-off-by: Linus Lüssing <linus.luessing@web.de>
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: batman-adv: Wrapper functions for sysfs storing
Linus Lüssing [Sun, 21 Nov 2010 23:55:53 +0000 (00:55 +0100)]
Staging: batman-adv: Wrapper functions for sysfs storing

Sysfs configuration options that just took a boolean value
(enable(d)/disable(d)/0/1) and integer setting basically all had the same
structure.

To avoid even more copy and pasting in the future and to make introducing
new configuration parameters for batman-adv simpler, more generic
wrapper functions are being introduced with this commit. They can deal with
boolean and unsigned integer parameters, storing them in the specified
atomic_t variables.

Signed-off-by: Linus Lüssing <linus.luessing@web.de>
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: batman-adv: Unify sysfs file names with their bat_priv atomics
Linus Lüssing [Sun, 21 Nov 2010 23:55:52 +0000 (00:55 +0100)]
Staging: batman-adv: Unify sysfs file names with their bat_priv atomics

Both sysfs entries and variable names shall be as descriptive as
possible while not exceeding a certain length. This patch renames
bat_priv atomics to be equally descriptive with their according sysfs
entries.

Unifying sysfs and bat_priv atomic names also makes it easier to find
each others pendant.

The reduced ("type"-)information which was previously indicated with a
_enabled for booleans got substituted by a comment in bat_priv.

This patch has also been done in regards for the future BAT_ATTR_*
macros (they only need one name argument instead of a file and variable
name).

Signed-off-by: Linus Lüssing <linus.luessing@web.de>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: batman-adv: softif bridge loop avoidance
Marek Lindner [Sun, 21 Nov 2010 23:55:51 +0000 (00:55 +0100)]
Staging: batman-adv: softif bridge loop avoidance

By connecting multiple batman-adv mesh nodes to the same ethernet
segment a loop can be created when the soft-interface is bridged
into that ethernet segment. A simple visualization of the loop
involving the most common case - a LAN as ethernet segment:

node1  <-- LAN  -->  node2
   |                   |
 wifi  <-- mesh -->  wifi

Packets from the LAN (e.g. ARP broadcasts) will circle forever from
node1 or node2 over the mesh back into the LAN.

This patch adds the functionality to detect other batman-adv nodes
connected to the LAN and select a 'gateway' to talk to the
non-batman-adv devices on this LAN. All traffic from and to the mesh
will be handled by this gateway to avoid the loop. OGMs received via
the soft-interface are interpreted as 'port announcements' to locate
potential batman-adv nodes. The patch can also deal with vlans on
top of batX and offers a list of LAN neighbors via debugfs.

Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
[sven.eckelmann@gmx.de: Rework on top of current version]
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: batman-adv: reassemble fragmented skb if mtu allows it
Andreas Langer [Sun, 21 Nov 2010 23:55:50 +0000 (00:55 +0100)]
Staging: batman-adv: reassemble fragmented skb if mtu allows it

Signed-off-by: Andreas Langer <an.langer@gmx.de>
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: batman-adv: fragment forwarded packets
Andreas Langer [Sun, 21 Nov 2010 23:55:49 +0000 (00:55 +0100)]
Staging: batman-adv: fragment forwarded packets

If a packet is too big to be forwarded over an interface it will be
fragmented on-the-fly (if fragmentation is enabled).

Signed-off-by: Andreas Langer <an.langer@gmx.de>
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: batman-adv: remove redundant is_my_mac() check in route_unicast_packet
Andreas Langer [Sun, 21 Nov 2010 23:55:48 +0000 (00:55 +0100)]
Staging: batman-adv: remove redundant is_my_mac() check in route_unicast_packet

Callers should check the if the received packet is for us before it
calls route_unicast_packet.

Signed-off-by: Andreas Langer <an.langer@gmx.de>
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: batman-adv: move skb reassembly of fragmented packets into dedicated function
Andreas Langer [Sun, 21 Nov 2010 23:55:47 +0000 (00:55 +0100)]
Staging: batman-adv: move skb reassembly of fragmented packets into dedicated function

Signed-off-by: Andreas Langer <an.langer@gmx.de>
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: batman-adv: add frag_ prefix to all fragmentation related functions
Andreas Langer [Sun, 21 Nov 2010 23:55:46 +0000 (00:55 +0100)]
Staging: batman-adv: add frag_ prefix to all fragmentation related functions

Signed-off-by: Andreas Langer <an.langer@gmx.de>
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: batman-adv: restructure fragmentation to handle batman unicast packets
Andreas Langer [Sun, 21 Nov 2010 23:55:45 +0000 (00:55 +0100)]
Staging: batman-adv: restructure fragmentation to handle batman unicast packets

The unicast_frag_send_skb() function expected 'raw' packets (without any
batman-adv header) to fragment them. This needs to be changed, so that
this function is able to fragment packets that already traveled inside
the mesh but need to be fragmented now.

Signed-off-by: Andreas Langer <an.langer@gmx.de>
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: batman-adv: use rcu callbacks when freeing batman_if
Marek Lindner [Sun, 21 Nov 2010 23:55:44 +0000 (00:55 +0100)]
Staging: batman-adv: use rcu callbacks when freeing batman_if

Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: batman-adv: convert batman_if custom refcounting to kref functions
Marek Lindner [Sun, 21 Nov 2010 23:55:43 +0000 (00:55 +0100)]
Staging: batman-adv: convert batman_if custom refcounting to kref functions

Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: batman-adv: Don't remove interface with spinlock held
Sven Eckelmann [Sun, 21 Nov 2010 23:55:42 +0000 (00:55 +0100)]
Staging: batman-adv: Don't remove interface with spinlock held

We call a lot of the netdevice code when holding if_list_lock which will
spin the whole time. This is not necessary because we only want to
protect the access to the list to be serialized. An extra queue can be
used which hold all interfaces which should be removed and then use that
queue without any locks for netdevice cleanup.

Reported-by: Rafal Lesniak <lesniak@eresi-project.org>
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: batman-adv: Add new sysfs files to README
Sven Eckelmann [Sun, 21 Nov 2010 23:55:41 +0000 (00:55 +0100)]
Staging: batman-adv: Add new sysfs files to README

Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: batman-adv: ensure that eth_type_trans gets linear memory
Marek Lindner [Sun, 21 Nov 2010 23:55:40 +0000 (00:55 +0100)]
Staging: batman-adv: ensure that eth_type_trans gets linear memory

eth_type_trans tries to pull data with the length of the ethernet header
from the skb. We only ensured that enough data for the first ethernet
header and the batman header is available in non-paged memory of the skb
and not for the ethernet after the batman header.

eth_type_trans would fail sometimes with drivers which don't ensure that
all there data is perfectly linearised.

Reported-by: Rafal Lesniak <lesniak@eresi-project.org>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: batman-adv: Replace Andrew Lunn as Staging maintainer
Sven Eckelmann [Sun, 21 Nov 2010 23:55:39 +0000 (00:55 +0100)]
Staging: batman-adv: Replace Andrew Lunn as Staging maintainer

Andrew Lunn didn't submit patches to staging since a while and may not
be the right person for new patches.

Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: iio: dac: ad5446: Remove unused sign member from chip specific information...
Michael Hennerich [Tue, 23 Nov 2010 10:40:13 +0000 (11:40 +0100)]
staging: iio: dac: ad5446: Remove unused sign member from chip specific information structure

Remove unused sign member from chip specific information structure
Fix typos

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: ad5446: Enable driver support for AD5620/AD5640/AD5660 DA converters
Michael Hennerich [Tue, 23 Nov 2010 10:14:16 +0000 (11:14 +0100)]
staging: iio: dac: ad5446: Enable driver support for AD5620/AD5640/AD5660 DA converters

Initial support for single channel, 12-/14-/16-Bit nanoDAC with On-Chip Reference

staging: iio: dac: ad5446: Fix according to review feedback

Review feedback by Jonathan Cameron:
Use kernel doc style to document headers.
Turn data into a union
Add some comments for clarity

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: documentation rewrite and cleanup of sysfs documetation
Jonathan Cameron [Mon, 22 Nov 2010 23:31:16 +0000 (23:31 +0000)]
staging: iio: documentation rewrite and cleanup of sysfs documetation

Change to capital syntax for documetation e.g. 'inX-inY_raw'
Use multiple 'What:' entries rather than wild cards or options so
as to make the documentation clearer and easier to search.
Some trivial spelling fixes.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: iio: adis16260 add suppport for adis16255 and adis16250.
Jonathan Cameron [Mon, 22 Nov 2010 23:09:48 +0000 (23:09 +0000)]
staging: iio: adis16260 add suppport for adis16255 and adis16250.

Unusual element is addition of 'negate' and 'axis' platform data
to ensure we support all the functionality of the adis16255 driver
currently in staging.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Matthias Brugger <mensch0815@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: iio: adis16260 add id table support
Jonathan Cameron [Mon, 22 Nov 2010 23:09:47 +0000 (23:09 +0000)]
staging: iio: adis16260 add id table support

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: iio: adc: Enable driver support for ad7887 AD converter
Michael Hennerich [Mon, 22 Nov 2010 13:35:32 +0000 (14:35 +0100)]
staging: iio: adc: Enable driver support for ad7887 AD converter

Enable support for AD7887:  SPI Micropower, 2-Channel, 125 kSPS, 12-Bit ADC

staging: iio: adc: Fix according to review feedback

Review feedback by Jonathan Cameron:
Combine statements.
Document struct members.
Remove redundant variable initialization.
Simplify multichannel scan from ring logic.
Fix coding style.

[v2]
staging: iio: adc: ad7887: Fix typos

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: Enable driver support for AD5444 and AD5446 DA converters
Michael Hennerich [Mon, 22 Nov 2010 10:15:23 +0000 (11:15 +0100)]
staging: iio: dac: Enable driver support for AD5444 and AD5446 DA converters

Enable support for AD5444 and AD5446:  12-/14-Bit High Bandwidth
Multiplying DACs with Serial Interface.

staging: iio: dac: Add support for AD5541AAD5512A digital to analog convertors

staging: iio: dac: Fix according to review feedback

Review feedback by Jonathan Cameron:
Remove spurious new line.
Document struct members.
Remove redundant variable initialization.

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: brcm80211: remove duplicated #include
Huang Weiyi [Sat, 20 Nov 2010 12:06:18 +0000 (20:06 +0800)]
staging: brcm80211: remove duplicated #include

Remove duplicated #include('s) in
  drivers/staging/brcm80211/brcmfmac/wl_cfg80211.c

Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agosst: log error returned by scu ipc read/write
Vinod Koul [Fri, 19 Nov 2010 15:10:39 +0000 (15:10 +0000)]
sst: log error returned by scu ipc read/write

scu ipc driver fails sometimes to read/write. This add logs with register
addr and ret code when these errors occur.

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agosst: Firmware error codes force number values
Vinod Koul [Fri, 19 Nov 2010 15:09:50 +0000 (15:09 +0000)]
sst: Firmware error codes force number values

To avoid mismatch in driver and firmware error codes assign specfic values
to each enum.

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agosst: Change the SST driver PCM interface
Vinod Koul [Fri, 19 Nov 2010 15:06:31 +0000 (15:06 +0000)]
sst: Change the SST driver PCM interface

The PCM interface in SST driver is cmds only, this patch changes the interface to open, close and cmd interface.
This allows SST driver to keep easy track of handles open

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: sep: Introduce sep driver
Mark Allyn [Wed, 17 Nov 2010 23:45:36 +0000 (15:45 -0800)]
Staging: sep: Introduce sep driver

This driver is for the Security Processor, a dedicated encryption
and decryption driver that is used on the Intel mobile platform.

This has been checked with checkpatch and there are four
warnings for lines over 80 charactors.

There is one compile warning. This is for a function that is
only used if the rar register driver is needed. There is an
ifdef in a header file that stubs out the rar register driver
if the rar register is not configured.

This driver does add a configuration, which is CONFIG_DX_SEP.

Signed-off-by: Mark Allyn <mark.a.allyn@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: clearpad_tm1217 depends on INPUT
Randy Dunlap [Wed, 17 Nov 2010 23:38:46 +0000 (15:38 -0800)]
staging: clearpad_tm1217 depends on INPUT

clearpad_tm1217 driver uses many input_() interfaces, so it should
depend on INPUT.

clearpad_tm1217.c:(.text+0xf19ac): undefined reference to `input_unregister_device'
clearpad_tm1217.c:(.text+0xf1b19): undefined reference to `input_event'
clearpad_tm1217.c:(.text+0xf1b31): undefined reference to `input_event'
clearpad_tm1217.c:(.text+0xf1bb4): undefined reference to `input_event'
clearpad_tm1217.c:(.text+0xf1bf2): undefined reference to `input_event'
drivers/built-in.o:clearpad_tm1217.c:(.text+0xf1c08): more undefined references to `input_event' follow
clearpad_tm1217.c:(.text+0xf1df3): undefined reference to `input_allocate_device'
clearpad_tm1217.c:(.text+0xf1eac): undefined reference to `input_set_abs_params'
clearpad_tm1217.c:(.text+0xf1ed1): undefined reference to `input_set_abs_params'
clearpad_tm1217.c:(.text+0xf1ed8): undefined reference to `input_register_device'
clearpad_tm1217.c:(.text+0xf2040): undefined reference to `input_unregister_device'
clearpad_tm1217.c:(.text+0xf204b): undefined reference to `input_free_device'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Ramesh Agarwal <ramesh.agarwal@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: ft1000: Fix compilation warning.
Marek Belisko [Thu, 18 Nov 2010 08:49:09 +0000 (09:49 +0100)]
staging: ft1000: Fix compilation warning.

This patch fix following warning:
drivers/staging/ft1000/ft1000-usb/ft1000_usb.c:67:22:
warning: ‘pft1000info’ may be used uninitialized in this function

Signed-off-by: Marek Belisko <marek.belisko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: iio: dac: Cleanup style - no functional changes
Michael Hennerich [Fri, 19 Nov 2010 14:16:46 +0000 (15:16 +0100)]
staging: iio: dac: Cleanup style - no functional changes

Stick to the 80 character line limit at least for code

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: Use spi_device_id
Michael Hennerich [Fri, 19 Nov 2010 14:16:45 +0000 (15:16 +0100)]
staging: iio: dac: Use spi_device_id

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: Use spi_write() and handle return value
Michael Hennerich [Fri, 19 Nov 2010 14:16:44 +0000 (15:16 +0100)]
staging: iio: dac: Use spi_write() and handle return value

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: Update drivers to use new attribute naming
Michael Hennerich [Fri, 19 Nov 2010 14:16:43 +0000 (15:16 +0100)]
staging: iio: dac: Update drivers to use new attribute naming

Remove depreciated macro from header

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: more consistent DAC sysfs attributes naming
Michael Hennerich [Fri, 19 Nov 2010 12:32:38 +0000 (13:32 +0100)]
staging: iio: dac: more consistent DAC sysfs attributes naming

Align DAC sysfs attributes naming with the convention used by ADC

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: brcm80211: stragglers not handled by unifdef
Brett Rudley [Fri, 19 Nov 2010 22:30:58 +0000 (14:30 -0800)]
staging: brcm80211: stragglers not handled by unifdef

Part of BMAC removal.

Signed-off-by: Brett Rudley <brudley@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: unifdef -UBCMSDIO
Brett Rudley [Fri, 19 Nov 2010 22:30:57 +0000 (14:30 -0800)]
staging: brcm80211: unifdef -UBCMSDIO

Part of BMAC removal.

Signed-off-by: Brett Rudley <brudley@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: remove bmac-only header files
Brett Rudley [Fri, 19 Nov 2010 22:30:56 +0000 (14:30 -0800)]
staging: brcm80211: remove bmac-only header files

Part of BMAC removal.

Signed-off-by: Brett Rudley <brudley@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: unifdef -UWLC_SPLIT
Brett Rudley [Fri, 19 Nov 2010 22:30:55 +0000 (14:30 -0800)]
staging: brcm80211: unifdef -UWLC_SPLIT

Part of BMAC removal.

Signed-off-by: Brett Rudley <brudley@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: unifdef -DWLC_LOW
Brett Rudley [Fri, 19 Nov 2010 22:30:54 +0000 (14:30 -0800)]
staging: brcm80211: unifdef -DWLC_LOW

Part of BMAC removal.

Signed-off-by: Brett Rudley <brudley@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: unifdef -UWLC_LOW_ONLY
Brett Rudley [Fri, 19 Nov 2010 22:30:53 +0000 (14:30 -0800)]
staging: brcm80211: unifdef -UWLC_LOW_ONLY

Part of BMAC removal.

Signed-off-by: Brett Rudley <brudley@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: unifdef -UWLC_HIGH_ONLY
Brett Rudley [Fri, 19 Nov 2010 22:30:52 +0000 (14:30 -0800)]
staging: brcm80211: unifdef -UWLC_HIGH_ONLY

Part of BMAC removal.

Signed-off-by: Brett Rudley <brudley@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: replaced PKTSETLEN macro by native __skb_trim call
Arend van Spriel [Thu, 18 Nov 2010 19:46:44 +0000 (20:46 +0100)]
staging: brcm80211: replaced PKTSETLEN macro by native __skb_trim call

- removed PKTSETLEN macro and used __skb_trim call instead.
- removed unused macros PKTSETPOOL and PKTPOOL

Reviewed-by: Henry Ptasinski <henryp@broadcom.com>
Reviewed-by: Brett Rudley <brudley@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: replace PKTPUSH and PKTPULL macros with native skbuff calls
Arend van Spriel [Thu, 18 Nov 2010 19:46:43 +0000 (20:46 +0100)]
staging: brcm80211: replace PKTPUSH and PKTPULL macros with native skbuff calls

Replacing PKTPUSH by skb_push() call and PKTPULL by skb_pull() call to make
it obvious what the operation is doing with the packet.

Reviewed-by: Henry Ptasinski <henryp@broadcom.com>
Reviewed-by: Brett Rudley <brudley@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: brcmfmac: cleanup bcmsdh_(un)register
Mike Rapoport [Wed, 17 Nov 2010 08:00:00 +0000 (10:00 +0200)]
staging: brcm80211: brcmfmac: cleanup bcmsdh_(un)register

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Brett Rudley <brudley@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: brcmfmac: remove PCI SDIO controller binding
Mike Rapoport [Wed, 17 Nov 2010 07:58:46 +0000 (09:58 +0200)]
staging: brcm80211: brcmfmac: remove PCI SDIO controller binding

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Brett Rudley <brudley@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agosst: remove rest of aava bits and aava related code
Vinod Koul [Wed, 17 Nov 2010 15:57:57 +0000 (15:57 +0000)]
sst: remove rest of aava bits and aava related code

This removes the remaining bit of aava dependent and related bits from driver

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: spectra: asynchronous init
Yong Wang [Wed, 17 Nov 2010 14:09:54 +0000 (22:09 +0800)]
staging: spectra: asynchronous init

The spectra nand driver takes quite some time to initialize because
it needs to scan the whole nand disk to find the latest block table.
This patch initializes the spectra nand driver asynchronously so that
other things in the kernel can initialize in parallel to the scanning
operation.

Signed-off-by: Yong Wang <yong.y.wang@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: spectra: move all init logic into nand_pci_probe
Yong Wang [Wed, 17 Nov 2010 14:08:28 +0000 (22:08 +0800)]
staging: spectra: move all init logic into nand_pci_probe

Currently there are some driver initialization logic that
is not part of nand_pci_probe function. This will result in
that part of driver initialization code executing even on
platforms without the corresponding hardware which is always
dangerous.

Signed-off-by: Chuanxiao Dong <chuanxiao.dong@intel.com>
Signed-off-by: Yong Wang <yong.y.wang@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: ft1000-usb: freeing uninitialized pointer
Dan Carpenter [Wed, 17 Nov 2010 08:54:35 +0000 (11:54 +0300)]
Staging: ft1000-usb: freeing uninitialized pointer

GCC complains that if (info->CardReady) is false we kfree() an
uninitialized pointer.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: nicpci.c: replace osl based PCI calls with native linux pci calls
Brett Rudley [Wed, 17 Nov 2010 01:41:15 +0000 (17:41 -0800)]
staging: brcm80211: nicpci.c: replace osl based PCI calls with native linux pci calls

Get rid of the private PCI access routines and replace with standard calls from linux/pci.h in nicpci.c

(The private versions are still used in siutils.c... for now)

Signed-off-by: Brett Rudley <brudley@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: s/osl_t/struct osl_info/g
Brett Rudley [Tue, 16 Nov 2010 23:45:48 +0000 (15:45 -0800)]
staging: brcm80211: s/osl_t/struct osl_info/g

Do the substitution (and then fix all the dang lines that were pushed past 80 columns.)

Some of the touched lines triggered checkpatch warnings for completely unrelated
reasons that were already there. Those will have to be addressed later.

Signed-off-by: Brett Rudley <brudley@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: completely remove osl_pubinfo_t typedef
Brett Rudley [Tue, 16 Nov 2010 21:16:59 +0000 (13:16 -0800)]
staging: brcm80211: completely remove osl_pubinfo_t typedef

Signed-off-by: Brett Rudley <brudley@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: expose osl contents and start combining osl and pub_osl.
Brett Rudley [Tue, 16 Nov 2010 21:16:58 +0000 (13:16 -0800)]
staging: brcm80211: expose osl contents and start combining osl and pub_osl.

Signed-off-by: Brett Rudley <brudley@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: bcm: signedness bug in InitCardAndDownloadFirmware()
Dan Carpenter [Sat, 13 Nov 2010 08:24:22 +0000 (11:24 +0300)]
Staging: bcm: signedness bug in InitCardAndDownloadFirmware()

status is used to store negative error codes throughout.  The only place
where this is a runtime bug is if create_worker_threads() fails.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: bcm: signedness bug in StoreSFParam()
Dan Carpenter [Sat, 13 Nov 2010 04:37:49 +0000 (07:37 +0300)]
Staging: bcm: signedness bug in StoreSFParam()

wrm() returns negative error codes so "ret" needs to be signed here.
There was place where wrm() returned positive EACCES instead of
negative -EACCES so I fixed that as well.  Also a few checkpatch.pl
issues.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: fix iio/gyro typos, build errors
Randy Dunlap [Sat, 13 Nov 2010 16:44:35 +0000 (08:44 -0800)]
staging: fix iio/gyro typos, build errors

Typo causes build errors.  Did anyone even build this driver?

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: iio/dds: double locking bugs
Dan Carpenter [Sat, 13 Nov 2010 09:05:32 +0000 (12:05 +0300)]
Staging: iio/dds: double locking bugs

This is a static checker patch and I don't have this hardware.

This code is unusual because while I've often seen a double lock, this
is the first time I've seen code that takes a lock 11 times in a row.  I
feel like I must have missed something.  But I've looked very carefully
I don't see any way the original code is correct.  Does spi_sync()
somehow release the lock in a way that I can't see?  Even if it does,
the locking would still be wrong.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: cptm1217: move free under dereference
Dan Carpenter [Sat, 13 Nov 2010 08:34:16 +0000 (11:34 +0300)]
Staging: cptm1217: move free under dereference

We dereference "ts" in the printk so move the kfree() down a line.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging/easycap: make module params private/static, fix build
Randy Dunlap [Thu, 11 Nov 2010 18:44:22 +0000 (10:44 -0800)]
staging/easycap: make module params private/static, fix build

The easycap driver has module parameters (bars, gain, & debug)
with global scope that intrude on the kernel namespace and cause
build problems.  Change the names of them to be driver-specific
and make 2 of them static.

drivers/built-in.o:(.bss+0x97c00): multiple definition of `debug'
ld: Warning: size of symbol `debug' changed from 58 in arch/x86/built-in.o to 4 in drivers/built-in.o

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Mike Thomas <rmthomas@sciolus.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: fix ste_rmi4 build, depends on INPUT
Randy Dunlap [Fri, 12 Nov 2010 22:47:02 +0000 (14:47 -0800)]
staging: fix ste_rmi4 build, depends on INPUT

The synaptics_i2c_rmi4 driver uses input_*() interfaces,
so it should depend on INPUT to fix its build errors:

ERROR: "input_event" [drivers/staging/ste_rmi4/synaptics_i2c_rmi4.ko] undefined!
ERROR: "input_free_device" [drivers/staging/ste_rmi4/synaptics_i2c_rmi4.ko] undefined!
ERROR: "input_register_device" [drivers/staging/ste_rmi4/synaptics_i2c_rmi4.ko] undefined!
ERROR: "input_set_abs_params" [drivers/staging/ste_rmi4/synaptics_i2c_rmi4.ko] undefined!
ERROR: "input_allocate_device" [drivers/staging/ste_rmi4/synaptics_i2c_rmi4.ko] undefined!
ERROR: "input_unregister_device" [drivers/staging/ste_rmi4/synaptics_i2c_rmi4.ko] undefined!

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: naveen.gaddipati@stericsson.com, js.ha@stericsson.com
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: autofs: fix coding style issue in dirhash.c
Tushar Mehta [Tue, 16 Nov 2010 06:43:50 +0000 (12:13 +0530)]
Staging: autofs: fix coding style issue in dirhash.c

This is a patch to the dirhash.c file that fixes up a number of issues
found by the checkpatch.pl tool

Signed-off-by: Tushar Mehta <tushariiitb@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: hv: add explanation of no-op set_multicast_list
Brandon Philips [Mon, 15 Nov 2010 19:55:33 +0000 (11:55 -0800)]
staging: hv: add explanation of no-op set_multicast_list

I was going to remove netvsc_set_multicast_list() so I think it is worth
adding a comment since it isn't immediately clear why you would want
this.

Signed-off-by: Brandon Philips <brandon@ifup.org>
Acked-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agodrivers/staging: Remove unnecessary casts of netdev_priv
Joe Perches [Mon, 15 Nov 2010 21:12:32 +0000 (13:12 -0800)]
drivers/staging: Remove unnecessary casts of netdev_priv

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agodrivers/staging: Remove unnecessary casts of pci_get_drvdata
Joe Perches [Mon, 15 Nov 2010 20:14:00 +0000 (12:14 -0800)]
drivers/staging: Remove unnecessary casts of pci_get_drvdata

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agodrivers/staging: Remove unnecessary semicolons
Joe Perches [Mon, 15 Nov 2010 03:04:48 +0000 (19:04 -0800)]
drivers/staging: Remove unnecessary semicolons

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: brcmfmac: remove PXA SDIO controller binding
Mike Rapoport [Sun, 14 Nov 2010 11:36:23 +0000 (13:36 +0200)]
staging: brcm80211: brcmfmac: remove PXA SDIO controller binding

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: remove unused osl_pkt{get,free}_static
Mike Rapoport [Sun, 14 Nov 2010 11:36:21 +0000 (13:36 +0200)]
staging: brcm80211: remove unused osl_pkt{get,free}_static

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: get rid of last bit of pci configspace workaround.
Brett Rudley [Sat, 13 Nov 2010 02:10:17 +0000 (18:10 -0800)]
staging: brcm80211: get rid of last bit of pci configspace workaround.

Signed-off-by: Brett Rudley <brudley@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: simplify pci_config_read/write osl routines.
Brett Rudley [Fri, 12 Nov 2010 23:28:30 +0000 (15:28 -0800)]
staging: brcm80211: simplify pci_config_read/write osl routines.

Start simplifying osl with goal of purging it entirely.

Signed-off-by: Brett Rudley <brudley@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: comedi: fix typo in error message
Nicolas Kaiser [Sat, 13 Nov 2010 18:43:27 +0000 (19:43 +0100)]
staging: comedi: fix typo in error message

Fix typo in error message of dux commands allocation.

Signed-off-by: Nicolas Kaiser <nikai@nikai.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: vme: ca91cx42: mark the registers' base address pointer as __iomem
Emilio G. Cota [Fri, 12 Nov 2010 11:15:54 +0000 (11:15 +0000)]
staging: vme: ca91cx42: mark the registers' base address pointer as __iomem

Signed-off-by: Emilio G. Cota <cota@braap.org>
Acked-by: Martyn Welch <martyn.welch@ge.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: vme: tsi148: mark the registers' base address pointer as __iomem
Emilio G. Cota [Fri, 12 Nov 2010 11:15:47 +0000 (11:15 +0000)]
staging: vme: tsi148: mark the registers' base address pointer as __iomem

Signed-off-by: Emilio G. Cota <cota@braap.org>
Acked-by: Martyn Welch <martyn.welch@ge.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: vme: mark struct vme_master_resource's base address pointer as __iomem
Emilio G. Cota [Fri, 12 Nov 2010 11:15:40 +0000 (11:15 +0000)]
staging: vme: mark struct vme_master_resource's base address pointer as __iomem

Signed-off-by: Emilio G. Cota <cota@braap.org>
Acked-by: Martyn Welch <martyn.welch@ge.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: vme_user: mark user-space buffers with __user
Emilio G. Cota [Fri, 12 Nov 2010 11:15:34 +0000 (11:15 +0000)]
staging: vme_user: mark user-space buffers with __user

Signed-off-by: Emilio G. Cota <cota@braap.org>
[martyn.welch@ge.com: modified to remove checkpatch warnings]
Signed-off-by: Martyn Welch <martyn.welch@ge.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: vme_user: remove __iomem marking from kern_buf and derivates
Emilio G. Cota [Fri, 12 Nov 2010 11:15:27 +0000 (11:15 +0000)]
staging: vme_user: remove __iomem marking from kern_buf and derivates

kern_buf is not iomem; it comes from kmalloc and is directly
dereferenced.

Signed-off-by: Emilio G. Cota <cota@braap.org>
Acked-by: Martyn Welch <martyn.welch@ge.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: vme_user: use an unsigned int for counting the number of kparams
Emilio G. Cota [Fri, 12 Nov 2010 11:15:21 +0000 (11:15 +0000)]
staging: vme_user: use an unsigned int for counting the number of kparams

unsigned int is what struct kparam_array internally uses.

Signed-off-by: Emilio G. Cota <cota@braap.org>
Acked-by: Martyn Welch <martyn.welch@ge.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: vme_user: declare private variables as static
Emilio G. Cota [Fri, 12 Nov 2010 11:15:14 +0000 (11:15 +0000)]
staging: vme_user: declare private variables as static

Signed-off-by: Emilio G. Cota <cota@braap.org>
[martyn.welch@ge.com: modified to remove checkpatch warnings]
Signed-off-by: Martyn Welch <martyn.welch@ge.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: vme: ca91cx42: declare static functions as such
Emilio G. Cota [Fri, 12 Nov 2010 11:15:07 +0000 (11:15 +0000)]
staging: vme: ca91cx42: declare static functions as such

Signed-off-by: Emilio G. Cota <cota@braap.org>
[martyn.welch@ge.com: modified to remove checkpatch warnings]
Signed-off-by: Martyn Welch <martyn.welch@ge.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: vme: tsi148: declare static functions as such
Emilio G. Cota [Fri, 12 Nov 2010 11:15:00 +0000 (11:15 +0000)]
staging: vme: tsi148: declare static functions as such

Signed-off-by: Emilio G. Cota <cota@braap.org>
[martyn.welch@ge.com: modified to remove checkpatch warnings]
Signed-off-by: Martyn Welch <martyn.welch@ge.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: vme: tsi148: remove unreachable line
Emilio G. Cota [Fri, 12 Nov 2010 11:14:54 +0000 (11:14 +0000)]
staging: vme: tsi148: remove unreachable line

Signed-off-by: Emilio G. Cota <cota@braap.org>
Acked-by: Martyn Welch <martyn.welch@ge.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: vme: tsi148: fix warning in free_irq
Emilio G. Cota [Fri, 12 Nov 2010 11:14:47 +0000 (11:14 +0000)]
staging: vme: tsi148: fix warning in free_irq

The cookie passed to request_irq isn't the same as the one passed
to free_irq, which results in the following warning:

[   63.243533] WARNING: at kernel/irq/manage.c:899 __free_irq+0x9b/0x17d()
[   63.243533] Hardware name:
[   63.243533] Trying to free already-free IRQ 17
[   63.243533] Modules linked in: vme_tsi148(-) vme e1000e iTCO_wdt iTCO_vendor_support [last unloaded: scsi_wait_scan]
[   63.243533] Pid: 2013, comm: rmmod Not tainted 2.6.35 #2
[   63.243533] Call Trace:
[   63.243533]  [<ffffffff81036ea3>] warn_slowpath_common+0x80/0x98
[   63.243533]  [<ffffffff81036f4f>] warn_slowpath_fmt+0x41/0x43
[   63.243533]  [<ffffffff810678c4>] __free_irq+0x9b/0x17d
[   63.243533]  [<ffffffff810679d9>] free_irq+0x33/0x4e
[   63.243533]  [<ffffffffa004a897>] tsi148_irq_exit+0x6b/0x70 [vme_tsi148]
[...]
[   63.243533] ---[ end trace bbf92311d969efb4 ]---

Fix it by passing the same cookie to both functions.

Signed-off-by: Emilio G. Cota <cota@braap.org>
[martyn.welch@ge.com: modified to remove checkpatch warnings]
Signed-off-by: Martyn Welch <martyn.welch@ge.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: vme: tsi148: remove double freeing of the IRQ in .remove
Emilio G. Cota [Fri, 12 Nov 2010 11:14:40 +0000 (11:14 +0000)]
staging: vme: tsi148: remove double freeing of the IRQ in .remove

tsi148_irq_exit is called twice in .remove, which causes an oops.

Remove the second call, which apart from being redundant cannot
possibly work; the CR/CSR space has been already unmapped.

Signed-off-by: Emilio G. Cota <cota@braap.org>
Acked-by: Martyn Welch <martyn.welch@ge.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: vme: tsi148: use list_for_each_safe when deleting resources in .remove
Emilio G. Cota [Fri, 12 Nov 2010 11:14:34 +0000 (11:14 +0000)]
staging: vme: tsi148: use list_for_each_safe when deleting resources in .remove

This fixes an oops when removing the module.

Signed-off-by: Emilio G. Cota <cota@braap.org>
Acked-by: Martyn Welch <martyn.welch@ge.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: vme: fix bogus clearing of the bus number in vme_free_bus_num
Emilio G. Cota [Fri, 12 Nov 2010 11:14:27 +0000 (11:14 +0000)]
staging: vme: fix bogus clearing of the bus number in vme_free_bus_num

Signed-off-by: Emilio G. Cota <cota@braap.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: vme_user: remove unreachable line
Emilio G. Cota [Fri, 12 Nov 2010 11:14:20 +0000 (11:14 +0000)]
staging: vme_user: remove unreachable line

Signed-off-by: Emilio G. Cota <cota@braap.org>
Acked-by: Martyn Welch <martyn.welch@ge.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: vme_user: return the appropriate error code when module_init fails
Emilio G. Cota [Fri, 12 Nov 2010 11:14:14 +0000 (11:14 +0000)]
staging: vme_user: return the appropriate error code when module_init fails

When init_module fails, 0 is returned anyway; the module is then installed
and oopses when we try to remove it:

[ 3236.368009] WARNING: at drivers/base/driver.c:262 driver_unregister+0x36/0x6f()
[ 3236.368012] Hardware name:
[ 3236.368014] Unexpected driver unregister!
[ 3236.368016] Modules linked in: vme_user(-) vme_tsi148 vme e1000e iTCO_wdt iTCO_vendor_support [last unloaded: vme]
[ 3236.368027] Pid: 16162, comm: rmmod Not tainted 2.6.35 #2
[ 3236.368029] Call Trace:
[ 3236.368037]  [<ffffffff81036ea3>] warn_slowpath_common+0x80/0x98
[ 3236.368044]  [<ffffffff81060a65>] ? __try_stop_module+0x0/0x58
[ 3236.368049]  [<ffffffff81036f4f>] warn_slowpath_fmt+0x41/0x43
[ 3236.368054]  [<ffffffff81060a65>] ? __try_stop_module+0x0/0x58
[ 3236.368059]  [<ffffffff811e8f78>] driver_unregister+0x36/0x6f
[ 3236.368066]  [<ffffffffa004aa44>] vme_unregister_driver+0xd/0xf [vme]
[ 3236.368072]  [<ffffffffa00616c8>] vme_user_exit+0x10/0x1e [vme_user]
[ 3236.368076]  [<ffffffff810612c1>] sys_delete_module+0x1ba/0x226
[ 3236.368082]  [<ffffffff812d6e14>] ? do_page_fault+0x25d/0x28a
[ 3236.368088]  [<ffffffff8100202b>] system_call_fastpath+0x16/0x1b
[ 3236.368092] ---[ end trace cab6d88ebc44c1de ]---

The appended fixes it by returning the appropriate error code in module_init
whenever something goes wrong, thus cancelling the insertion of the module.

Signed-off-by: Emilio G. Cota <cota@braap.org>
Acked-by: Martyn Welch <martyn.welch@ge.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: vme: style: convert '&(foo)' to '&foo'
Emilio G. Cota [Fri, 12 Nov 2010 11:14:07 +0000 (11:14 +0000)]
staging: vme: style: convert '&(foo)' to '&foo'

done with
find . -name '*.c' | xargs perl -p -i -e 's/&\(([^()]+)\)/&$1/g'

Signed-off-by: Emilio G. Cota <cota@braap.org>
Acked-by: Martyn Welch <martyn.welch@ge.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: ft1000: Copy from user into correct data
Steven Rostedt [Thu, 11 Nov 2010 16:29:25 +0000 (11:29 -0500)]
staging: ft1000: Copy from user into correct data

While doing a ktest.pl I used a MIN_CONFIG that had STAGING enabled, and
a randconfig with CONFIG_DEBUG_STRICT_USER_COPY_CHECKS enabled caught
the following bug:

In file included from /home/rostedt/work/autotest/nobackup/linux-test.git/arch/x86/include/asm/uaccess.h:571:0,
                 from /home/rostedt/work/autotest/nobackup/linux-test.git/include/linux/poll.h:14,
                 from /home/rostedt/work/autotest/nobackup/linux-test.git/drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c:32:
In function 'copy_from_user',
    inlined from 'ft1000_ChIoctl' at /home/rostedt/work/autotest/nobackup/linux-test.git/drivers/staging/ft1000/ft1000-usb/ft1000_chdev.c:702:36:
/home/rostedt/work/autotest/nobackup/linux-test.git/arch/x86/include/asm/uaccess_32.h:212:26: error: call to 'copy_from_user_overflow' declared with attribute error: copy_from_user() buffer size is not provably correct

Looking at the code it was obvious what the problem was. The pointer
dpram_data was being allocated but the address was being written to.
Looking at the comment above the code shows that it use to write into an
element of that pointer where the '&' is appropriate. But now that it
writes to the pointer itself, we need to remove the '&' otherwise we
write over the pointer and not into the data it points to.

Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Cc: Marek Belisko <marek.belisko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: ft1000: Fix error goto statements.
Marek Belisko [Fri, 12 Nov 2010 09:27:44 +0000 (10:27 +0100)]
staging: ft1000: Fix error goto statements.

With commit 2dab1ac81b4767095f96503a9ac093a68c6e9c95 there
was intruduced error which lead to stopping uninitialized
kthread which leads to kernel panics.

This patch fix problems with common entry point in correct
way.

Signed-off-by: Marek Belisko <marek.belisko@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: Merge 2.6.37-rc2 into staging-next
Greg Kroah-Hartman [Tue, 16 Nov 2010 18:44:50 +0000 (10:44 -0800)]
Staging: Merge 2.6.37-rc2 into staging-next

This was necessary in order  to resolve some conflicts that happened
between -rc1 and -rc2 with the following files:
drivers/staging/bcm/Bcmchar.c
drivers/staging/intel_sst/intel_sst_app_interface.c

All should be resolved now.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoLinux 2.6.37-rc2
Linus Torvalds [Tue, 16 Nov 2010 02:31:02 +0000 (18:31 -0800)]
Linux 2.6.37-rc2

13 years agocapabilities/syslog: open code cap_syslog logic to fix build failure
Eric Paris [Mon, 15 Nov 2010 23:36:29 +0000 (18:36 -0500)]
capabilities/syslog: open code cap_syslog logic to fix build failure

The addition of CONFIG_SECURITY_DMESG_RESTRICT resulted in a build
failure when CONFIG_PRINTK=n.  This is because the capabilities code
which used the new option was built even though the variable in question
didn't exist.

The patch here fixes this by moving the capabilities checks out of the
LSM and into the caller.  All (known) LSMs should have been calling the
capabilities hook already so it actually makes the code organization
better to eliminate the hook altogether.

Signed-off-by: Eric Paris <eparis@redhat.com>
Acked-by: James Morris <jmorris@namei.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoMerge branch 'omap-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Mon, 15 Nov 2010 22:06:11 +0000 (14:06 -0800)]
Merge branch 'omap-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6

* 'omap-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6:
  arm: omap1: devices: need to return with a value
  OMAP1: camera.h: add missing include
  omap: dma: Add read-back to DMA interrupt handler to avoid spuriousinterrupts
  OMAP2: Devkit8000: Fix mmc regulator failure

13 years agoMerge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelv...
Linus Torvalds [Mon, 15 Nov 2010 22:05:44 +0000 (14:05 -0800)]
Merge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging

* 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
  hwmon: (w83795) Check for BEEP pin availability
  hwmon: (w83795) Clear intrusion alarm immediately
  hwmon: (w83795) Read the intrusion state properly
  hwmon: (w83795) Print the actual temperature channels as sources
  hwmon: (w83795) List all usable temperature sources
  hwmon: (w83795) Expose fan control method
  hwmon: (w83795) Fix fan control mode attributes
  hwmon: (lm95241) Check validity of input values
  hwmon: Change mail address of Hans J. Koch

13 years agoMerge branch 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvar...
Linus Torvalds [Mon, 15 Nov 2010 22:03:17 +0000 (14:03 -0800)]
Merge branch 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging

* 'i2c-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
  i2c: Sanity checks on adapter registration
  i2c: Mark i2c_adapter.id as deprecated
  i2c: Drivers shouldn't include <linux/i2c-id.h>
  i2c: Delete unused adapter IDs
  i2c: Remove obsolete cleanup for clientdata

13 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes...
Linus Torvalds [Mon, 15 Nov 2010 22:01:33 +0000 (14:01 -0800)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci-2.6:
  PCI: sysfs: fix printk warnings
  PCI: fix pci_bus_alloc_resource() hang, prefer positive decode
  PCI: read current power state at enable time
  PCI: fix size checks for mmap() on /proc/bus/pci files
  x86/PCI: coalesce overlapping host bridge windows
  PCI hotplug: ibmphp: Add check to prevent reading beyond mapped area