Commit Graph

10577 Commits (997d3eaf02cad6fdb54bd6085c9a7c48ddd68a2d)

Author SHA1 Message Date
Aaro Koskinen 7548a83e5f 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>
2011-10-12 09:51:45 -06:00
Aaro Koskinen 6048d761d2 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>
2011-10-12 09:51:45 -06:00
Aaro Koskinen c62f2e466f 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>
2011-10-12 09:51:44 -06:00
Aaro Koskinen 19c1e88e02 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>
2011-10-12 09:51:44 -06:00
Aaro Koskinen 54301b5cfe 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>
2011-10-12 09:51:44 -06:00
Seth Jennings 3d65c85f91 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>
2011-10-12 09:29:03 -06:00
Arend van Spriel fc2d6e573b 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>
2011-10-12 09:21:18 -06:00
Arend van Spriel 5b435de0d7 net: wireless: add brcm80211 drivers
Add the brcm80211 tree to drivers/net/wireless, and disable the version that's
in drivers/staging.  This version includes the sources currently in staging,
plus any changes that have been sent out for review.

Sources in staging will be deleted in a followup patch.

Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2011-10-11 15:55:30 -04:00
John W. Linville 094daf7db7 Merge branch 'master' of git://git.infradead.org/users/linville/wireless-next into for-davem
Conflicts:
	Documentation/feature-removal-schedule.txt
2011-10-11 15:35:42 -04:00
Kevin McKinney 54ced00639 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>
2011-10-11 10:18:58 -06:00
Kevin McKinney ca45e70029 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>
2011-10-11 10:18:57 -06:00
Kevin McKinney f969f84ed9 Staging: bcm: Fix coding style issues reported by checkpatch.pl
This patch cleans up several code style issues found
in InterfaceInit.c reported by checkpatch.pl.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-11 10:18:57 -06:00
Kevin McKinney d491061b98 Staging: bcm: Fix assignment issue in if statement reported by checkpatch.pl.
This patch fixes an error where an assignment "="
was being used in an if statement to determine if
Firmware was downloaded. This patch removes that
assignment, and places it above the if statement.
The if statement then evaluates the status to
verify if "0" successful, or != 0 failure.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-11 10:18:21 -06:00
Kevin McKinney 9d4f1d0c9d Staging: bcm: Remove assignment in if condition reported by checkpatch.pl
There is a case where an assignment was being done
in an if condition. This patch removes the assignment
from the if condition and places the assignment above
the if statement; thereby improving the readability of
the code.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-11 10:18:21 -06:00
Kevin McKinney a8a1cdd6d4 Staging: bcm: Replace dated variable __FUNCTION__ reported by checkpatch.pl
This patch replaces the obsolete variable, __FUNCTION__, that
holds the name of the current function with variable, __func__.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-11 10:18:21 -06:00
Kevin McKinney 6a4ef5f9b3 Staging: bcm: Fix coding style issues reported by checkpatch.pl
This patch cleans up several hundred code style issues found
in Misc.c reported by checkpatch.pl.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-11 10:18:20 -06:00
Mark Einon a098582101 staging: et131x: Update TODO list
Added some more tasks to the TODO list, as highlighted by Francois
Romieu <romieu@fr.zoreil.com>.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-11 10:10:30 -06:00
Mark Einon a7203d58cb staging: et131x: Remove unused mac defines
Remove some unused defines from et1310_mac.c.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-11 10:10:30 -06:00
Mark Einon 33fd472ee7 staging: et131x: Fix et131x smatch issues
This fixes the following issues:

et131x_initpci.c +488 et131x_adjust_link(45) error: we previously assumed 'phydev' could be null.
et131x_initpci.c +504 et131x_adjust_link(61) warn: variable dereferenced before check 'phydev'

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-11 10:10:30 -06:00
Mark Einon 6617c36987 staging: et131x: Fix et131x sparse warnings
This fixes the following warnings:

et1310_mac.c:375:44: warning: incorrect type in initializer (different address spaces)
et1310_mac.c:382:28: warning: incorrect type in argument 2 (different address spaces)
et1310_mac.c:384:31: warning: incorrect type in argument 2 (different address spaces)
et131x_initpci.c:555:5: warning: symbol 'et131x_mii_probe' was not declared. Should it be static?
et131x_netdev.c:267:5: warning: symbol 'et131x_ioctl' was not declared. Should it be static?
et131x_netdev.c:285:5: warning: symbol 'et131x_set_packet_filter' was not declared. Should it be static?
et131x_netdev.c:347:6: warning: symbol 'et131x_multicast' was not declared. Should it be static?
et131x_netdev.c:420:5: warning: symbol 'et131x_tx' was not declared. Should it be static?
et131x_netdev.c:453:6: warning: symbol 'et131x_tx_timeout' was not declared. Should it be static?
et131x_netdev.c:511:5: warning: symbol 'et131x_change_mtu' was not declared. Should it be static?
et131x_netdev.c:564:5: warning: symbol 'et131x_set_mac_addr' was not declared. Should it be static?

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-11 10:10:29 -06:00
Mark Einon b6f4160c4e staging: et131x: Remove file et131x_version.h
Removed defines in et131x_version.h and replaced them by actual
strings where convinient, or moved them to et131x.h

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-11 10:08:23 -06:00
Mark Einon f247be5d6b staging: et131x: Move pm calls from pci device to driver device
Move the pci driver suspend/resume calls up to the driver.pm ops
structure, as they are not pci device specific.

Thanks to Francois Romieu <romieu@fr.zoreil.com> for pointing this out.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-11 10:08:23 -06:00
Mark Einon a75fc17aaa staging: et131x: Remove error path from suspend/resume code
Removing an error path from et131x suspend/resume functions.

Also added a call to phy_stop() to complement the phy_start() call
during device start/stop routine.

Thanks to Francois Romieu <romieu@fr.zoreil.com> for pointing this out.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-11 10:08:22 -06:00
Mark Einon a9bd8ddad6 staging: et131x: Removing Olaf Hartmann's email as it bounces
On 3 October 2011 18:51, Uwe Ranft <uwe.ranft@telozo.com> wrote:
> Hello,
> olaf is not more longer owner of this e-mailadress. he has left our
> company.
> Please remove olaf fron the mailing list!
> Best Regards
> Uwe

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-11 10:08:22 -06:00
Larry Finger 447ff88652 staging: r8712u: Fix possible out-of-bounds index with TKIP and AES keys
Array XGrpKey has only 2 elements and uses (keyid - 1) as the index, which
allows the possibility of memory corruption from an out-of-bounds index.

This problem was reported by a new version of smatch.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-11 10:02:49 -06:00
Seth Jennings 8550be08cb staging: zcache: fix crash on cpu remove
In the case that a cpu is taken offline before zcache_do_preload() is
ever called on the cpu, the per-cpu zcache_preloads structure will
be uninitialized.  In the CPU_DEAD case for zcache_cpu_notifier(),
kp->obj is not checked before calling kmem_cache_free() on it.
If it is NULL, a crash results.

This patch ensures that both kp->obj and kp->page are not NULL before
calling the respective free functions. In practice, just checking
one or the other should be sufficient since they are assigned together
in zcache_do_preload(), but I check both for safety.

Signed-off-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Acked-by: Dave Hansen <dave@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-11 10:02:49 -06:00
Dan Carpenter 5ba321cf17 Staging: dt3155v4l: silence a compiler warning
The '!' is dead code that was left over from a previous version.
It causes a compiler warning:
drivers/staging/dt3155v4l/dt3155v4l.c:335:3: warning: value computed
	is not used

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-11 10:01:47 -06:00
Thomas Petazzoni aa3e842d2c easycap: fix ntsc module parameter description
Cc: Mike Thomas <rmthomas@sciolus.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-11 10:01:47 -06:00
Lars-Peter Clausen a45186c0cd staging:iio:dac:ad5638: Fix channel address
Commit c6fc806247 ("staging:iio: ABI rework - add in_ or out_ prefix to
channnels") added the AD5868_CHANNEL macro to simplify channel initialization.
Unfortunately the macro hardcodes the channel's address to AD5686_ADDR_DAC0. As
a result writing to any of the channels will change the value of the first
channel.

This patch fixes the issue by calculating the channel address based on the
channel number.

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>
2011-10-11 09:58:59 -06:00
Jonathan Cameron 638e59fc8c staging:iio:dac/dds/impedance dev_info to indio_dev for consistency
We had a random missmatch of these two.  Lets pick the most common
and get rid of the other.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>

For adxxxx parts
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-11 09:58:59 -06:00
Jonathan Cameron 84f79ecb0c staging:iio:adc:naming: dev_info to indio_dev for consistency
We had a random missmatch of these two.  Lets pick the most common
and get rid of the other.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-11 09:58:59 -06:00
Jonathan Cameron 2579a0df14 staging:iio:accel:sca3000 dev_info to indio_dev renaming.
Again, there is a mix of the two names for the struct iio_dev.
Lets pick one and run with it.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-11 09:58:59 -06:00
Jonathan Cameron f8c6f4e9a4 staging:iio:core:naming: dev_info to indio_dev for consistency
We had a random missmatch of these two.  Lets pick the most common
and get rid of the other.  This patch covers the core.  Others
will clean up the drivers.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-11 09:58:58 -06:00
Dan Carpenter ee760ab2a9 Staging: iio/adc/ad7150: release lock on error
The error_ret label should have been before the mutex_unlock().  It's
a typo.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-11 09:58:58 -06:00
Dan Carpenter 15fbc198e6 Staging: iio/light/tsl2563: fix compile warning
This fixes a compile warning:
drivers/staging/iio/light/tsl2563.c:696:2:
	warning: initialization from incompatible pointer type [enabled by default]
drivers/staging/iio/light/tsl2563.c:696:2:
	warning: (near initialization for ‘tsl2563_info.write_event_value’) [enabled by default]

The tsl2563_write_thresh() function returns zero on success and error
codes on failure, so nothing is lost by making the return type int
instead of ssize_t.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-11 09:58:58 -06:00
Dan Carpenter 97d35f281e Staging: iio/light/tsl2563: unlock on an error path
We need to unlock here before returning.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-11 09:58:58 -06:00
Greg Kroah-Hartman d181daa06d Staging: hv: storvsc: remove last usage of DPRINT_WARN
Used the correct dev_warn() call instead.

Cc: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-11 09:51:21 -06:00
Thomas Hellstrom 5a7b74beca vmwgfx: Take the driver out of staging
Also improve a bit on the Kconfig help.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
2011-10-11 13:06:36 +01:00
Greg Kroah-Hartman 46a9719136 Staging: hv: move hyperv code out of staging directory
After many years wandering the desert, it is finally time for the
Microsoft HyperV code to move out of the staging directory.  Or at least
the core hyperv bus code, and the utility driver, the rest still have
some review to get through by the various subsystem maintainers.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
2011-10-10 22:52:55 -06:00
K. Y. Srinivasan 715a4801e7 Staging: hv: netvsc: Fix a dereferencing issue
net_dev is being de-referenced without proper checking; fix it.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-10 22:50:00 -06:00
Olaf Hering 92ae4ebdaa staging: hv: storvsc: ignore SET_WINDOW scsi command
Some commands sent by smartd will offline the device.
With this change applied, smartd sill not monitor the device anymore.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-10 22:50:00 -06:00
K. Y. Srinivasan e2bb653783 Staging: hv: util: Invoke cn_netlink_send() in a work context
Invoke cn_netlink_send() in a work context as opposed being called
in the context of  channel callback. On entry into the channel callback
code the channel inbound spin lock is held and deferring to a work
context avoids having to invoke cn_netlink_send() while holding
the inbound lock. As part of this adjustment, also increase the
timeout value for waiting for the user level component of KVP.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-10 22:50:00 -06:00
K. Y. Srinivasan 76e5f8135d Staging: hv: util: Fix a bug in kvp implementation
The host gurantees that there can be only one kvp transaction active
against the guest. So, the transaction active state is needed only to
protect against spurious user level calls. The current code had a race
condition where the guest could prematurely return because the previous
transaction state was not cleared - this state was being cleared after
sending the response to the host and there was a window where the host
could notify the guest of a new transaction before the transaction active
state was properly set.
Also deal with the case when the user mode component
does not respond in a timely fashion correctly.
I would like to thank Long Li <longli@microsoft.com>
for identifying the problem.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Diagnosed-by: Long Li <longli@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-10 17:05:27 -07:00
Linus Torvalds a24d025a08 Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/upstream-linus
* 'upstream' of git://git.linux-mips.org/pub/scm/upstream-linus: (29 commits)
  MIPS: Call oops_enter, oops_exit in die
  staging/octeon: Software should check the checksum of no tcp/udp packets
  MIPS: Octeon: Enable C0_UserLocal probing.
  MIPS: No branches in delay slots for huge pages in handle_tlbl
  MIPS: Don't clobber CP0_STATUS value for CONFIG_MIPS_MT_SMTC
  MIPS: Octeon: Select CONFIG_HOLES_IN_ZONE
  MIPS: PM: Use struct syscore_ops instead of sysdevs for PM (v2)
  MIPS: Compat: Use 32-bit wrapper for compat_sys_futex.
  MIPS: Do not use EXTRA_CFLAGS
  MIPS: Alchemy: DB1200: Disable cascade IRQ in handler
  SERIAL: Lantiq: Set timeout in uart_port
  MIPS: Lantiq: Fix setting the PCI bus speed on AR9
  MIPS: Lantiq: Fix external interrupt sources
  MIPS: tlbex: Fix build error in R3000 code.
  MIPS: Alchemy: Include Au1100 in PM code.
  MIPS: Alchemy: Fix typo in MAC0 registration
  MIPS: MSP71xx: Fix build error.
  MIPS: Handle __put_user() sleeping.
  MIPS: Allow forced irq threading
  MIPS: i8259: Mark cascade interrupt non-threaded
  ...
2011-10-10 14:39:03 +12:00
Ian Campbell 5d6bcdfe38 net: use DMA_x_DEVICE and dma_mapping_error with skb_frag_dma_map
When I converted some drivers from pci_map_page to skb_frag_dma_map I
neglected to convert PCI_DMA_xDEVICE into DMA_x_DEVICE and
pci_dma_mapping_error into dma_mapping_error.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-10-06 16:17:20 -04:00
Ian Campbell 6caaf90be1 hv: netvsc: convert to SKB paged frag API.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Cc: "K. Y. Srinivasan" <kys@microsoft.com>
Cc: Abhishek Kane <v-abkane@microsoft.com>
Cc: devel@driverdev.osuosl.org
Cc: netdev@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-10-05 17:36:00 -04:00
Ian Campbell bf3f1a6081 et131x: convert to SKB paged frag API.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Cc: Mark Einon <mark.einon@gmail.com>
Cc: devel@driverdev.osuosl.org
Cc: netdev@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-10-05 17:36:00 -04:00
Jonathan Cameron 93decf3661 staging:iio:resolver:ad2s1210 cleanup gpio handling.
Basically make use of the gpio array functions.
Technically the free doesn't need as much info
as given here, but this keeps it clean and easy
to follow.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-05 13:47:48 -07:00
Jonathan Cameron f97beb535b staging:iio:resolver:ad2s1210 drop raw config register access
This should never have been exposed to userspace

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-05 13:47:48 -07:00
Jonathan Cameron 29148543c5 staging:iio:resolver:ad2s1210 minimal chan spec conversion.
Just convert the raw reads in this patch.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-05 13:47:47 -07:00
Jonathan Cameron bf52f0591f staging:iio:resolver:ad2s1210 ensure iio_dev->name is set
This is needed to ensure the required name attribute is
created. Using an id table is the route most consistent
with other drivers.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-05 13:47:47 -07:00
Jonathan Cameron 10e4a52b6e staging:iio:resolver rename ad2s120x ->ad2s1200
There are far too many possible part numbers that are
not covered in here to have such a generic name.
So move to naming after one of the supported parts.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-05 13:47:47 -07:00
Jonathan Cameron 9c5ed82942 staging:iio:resolver:ad2s120x chan spec conversion
Straight forward conversion.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-05 13:47:47 -07:00
Jonathan Cameron d4c926f2ba staging:iio:Documentation gyro -> anglvel updates in attribute names
Follows directly from change made in previous patch.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-05 13:47:47 -07:00
Jonathan Cameron 41ea040c7b staging:iio: rename gyro channels to anglvel
Ensure naming reflects what is measured, not how it is done.
Resolvers can measure the same thing for starters.
IIO_GYRO->IIO_ANGL_VEL to ensure consistent naming.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-05 13:47:46 -07:00
Jonathan Cameron 199d847a2d staging:iio:resolver:ad2s90 chan spec conversion
Trivial conversion.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-05 13:47:46 -07:00
Jonathan Cameron 19147f5bc6 staging:iio:resolver:ad2s90 ensure name is passed to iio_core.
Scraps the pointless name define and adds an id table.
It's not technically required in drivers with only one supported
part but it does make the probe code more consistent.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-05 13:47:46 -07:00
Jonathan Cameron 72a86ccd3a staging:iio:resolver:ad2s90 fix registration of null pointer
When the new allocation code was introduced a stray pointer
to iio_dev structure was left in the chip state structure.
This was never set but was then registered with the core.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-05 13:47:46 -07:00
Jonathan Cameron 4a70513074 staging:iio:lisght:isl29018 use IIO_PROCESSED enum value.
No functional change, just a trivial tidy up so all drivers
do the same thing.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-05 13:47:46 -07:00
Jonathan Cameron 48a2c3799b staging:iio:adc:ad7314 removal. Supported via hwmon.
Driver ported over to hwmon where it fits much better.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-05 13:47:45 -07:00
Franky Lin 5df06b16d5 staging: brcm80211: remove brcmf_op_if from fullmac
Absorb related code into brcmf_add_if/brcmf_del_if. This is part
of the net device interface clean up.

Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-05 13:42:52 -07:00
Franky Lin f461a29412 staging: brcm80211: clean up struct brcmf_if in fullmac
Some elements in structure brcmf_if are unused at all or
redundant. This patch cleans it up.

Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-05 13:42:52 -07:00
Arend van Spriel 5d3e78eeeb staging: brcm80211: cleanup driver variable references
Throughout the data structures within the driver several references
to the driver variables were stored. As the storage and access
functions are now consolidated into srom.c those references are
no longer needed and have been removed.

Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-05 13:42:51 -07:00
Arend van Spriel 4d648c8b32 staging: brcm80211: remove parameter 'off' from _initvars_srom_pci()
The function is called once with parameter 'off' fixed to zero. This
parameter has been removed.

Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-05 13:42:51 -07:00
Arend van Spriel 2a9b065c3d staging: brcm80211: replace string based variable storage by linked list
The storage of variables obtained from srom are now stored in a linked
list and lookup is done based on the enumerated identifier.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-05 13:42:51 -07:00
Arend van Spriel 36bd40db3c staging: brcm80211: use enum identifiers in srom variable tables
In the srom variable tables fields were identified using string
identifiers. This has been replaced by enumeration identifiers.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-05 13:42:51 -07:00
Arend van Spriel fe19e50ed9 staging: brcm80211: use identifiers instead of string for srom lookup
The driver variables from srom are stored in memory with string
identifiers and the caller needed to use this string identifier
to retrieve a driver variable. The commit changes the calling
code replacing strings with enumerated identifiers.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-05 13:42:51 -07:00
Arend van Spriel 83773bcede staging: brcm80211: remove invalid variable lookup from srom
In the driver several driver variables were looked up that are
not supported by the srom code. These have been removed.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@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>
2011-10-05 13:42:50 -07:00
Arend van Spriel bbbf4f42f5 staging: brcm80211: fix thread blocking issue in brcmf_sdbrcm_bus_stop()
The function brcmf_sdbrcm_bus_stop() terminates the watchdog and dpc
thread, but this function can be called from the dpc thread itself.
Stopping the dpc thread is only done when it is not the 'current'
thread.

Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-05 13:42:50 -07:00
Arend van Spriel 3956b4a2dd staging: brcm80211: remove locking macro definitions
The driver contained locking macros which map directly to the
lock function provided by the kernel. It does not provide any
additional value so these have been removed.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-05 13:42:50 -07:00
Arend van Spriel 7ddaad7eb4 staging: brcm80211: change parameter in driver variable lookup
The functions getvar() and getintvar() had to pass the buffer
containing the driver variables. Now they pass the structure
containing this buffer hiding what type of buffer/container
is used for storing the driver variables.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-05 13:42:50 -07:00
Arend van Spriel f4e5c544d1 staging: brcm80211: remove code duplication for driver variable lookup
The phy code used its own driver variable lookup functions which were
duplicates of those in the brcmsmac driver (in srom.c). The phy code
now uses the functions in srom.c through the phy_shim interface.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-05 13:42:49 -07:00
Franky Lin 43e45c3e89 staging: brcm80211: remove redundant bus register layer from fullmac
Remove some single line functions for bus register/unregister interface

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-05 13:42:49 -07:00
Franky Lin bd42e67bbe staging: brcm80211: remove threads_only code from fullmac
threads_only is always true as we never use the tasklet implementation.
So related code is removed.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-05 13:42:49 -07:00
Arend van Spriel 03c74dada5 staging: brcm80211: move driver variable functions to srom.c
The driver uses variables which are stored in string format. Using
strings as variable identifiers is disliked by the community. The
driver has been cleaned up and the only module providing these
variables is srom.c. The variable retrieval functions have been
moved to srom.c in preparation of a more likable way to store and
lookup these driver variables.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-05 13:42:49 -07:00
Roland Vossen d0f5527d39 staging: brcm80211: smac: fix for 64 bit systems
A bug was introduced by the following commit (Sep 13):

    staging: brcm80211: use endian annotated structures in brcmsmac

Result was that 64 bits systems will not be able to acquire an IP address.
Also the rmmod crashed. This has been fixed and retested on a Sparc64.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-05 13:39:05 -07:00
Roland Vossen 8be00d98f1 staging: brcm80211: softmac: added event tracing
Dpc and timer events can now be traced. Combined with Mac80211
driver callback tracing, all entry points into the driver can now
be traced.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-05 13:39:05 -07:00
Alwin Beukers 68327a1910 staging: brcm80211: remove N mode validation function
Removed the brcms_c_nmode_validate function as it only checks N-mode
capability, which should always be true.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-05 13:39:05 -07:00
Alwin Beukers 0f90d23cf4 staging: brcm80211: combined if statements
Combined if statements in brcms_c_edcf_setparams and brcms_c_wme_setparams functions.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-05 13:39:04 -07:00
Alwin Beukers fa1b6ab7a5 staging: brcm80211: remove brcms_b_dotxstatus wrapper function
- removed brcms_b_dotxstatus
- changed 'fatal' argument of brcms_b_txstatus from INOUT to OUT.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-05 13:39:04 -07:00
Alwin Beukers 1689e9b118 staging: brcm80211: removed synchronisation of wlc->machwcap field
- removed copying field wlc->machwcap from brcms_hardware to brcms_c_info
  during module attach.
- field wlc->machwcap was written but never read. Therefore it was removed.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-05 13:39:04 -07:00
Alwin Beukers d75c7be5e8 staging: brcm80211: removed unneeded call to brcms_b_tx_fifo_suspended
- removed call to brcms_b_tx_fifo_suspended on receipt of TX FIFO suspend/flush
  completion signal.
- removed brcms_b_tx_fifo_suspended function as it is not being used elsewhere.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-05 13:39:04 -07:00
Alwin Beukers eda075b546 staging: brcm80211: cleanup of several wrapper functions
- removed brcms_c_write_template_ram function.
- removed brcms_c_mctrl function.
- removed brcms_c_pllreq function.
- removed brcms_c_mhf function.
- removed brcms_c_rate_shm_offset function.
- removed brcms_c_write_hw_bcntemplates function.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-05 13:39:04 -07:00
Alwin Beukers 62b54fca4b staging: brcm80211: cleanup of transmit buffer size related wrapper function
Removed brcms_c_xmtfifo_sz_get function.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-05 13:39:03 -07:00
Alwin Beukers 702e1430bd staging: brcm80211: cleanup of shared memory related wrapper functions
- removed brcms_c_read_shm and brcms_c_write_shm functions.
- removed redundant argument check from brcms_c_copyto_shm function.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-05 13:39:03 -07:00
Alwin Beukers b2d62733e6 staging: brcm80211: removed redundant code from brcms_c_set_gmode
The comment says the rateset is being cleared when switching to GMODE_LEGACY_B,
but the code that follows it does not do so. Besides, the rateset is already
valid at this point.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-05 13:39:03 -07:00
Alwin Beukers 96b7484781 staging: brcm80211: decreased indentation level of brcms_c_wme_setparams function
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-05 13:39:03 -07:00
Alwin Beukers dd5be5ea7e staging: brcm80211: removed empty brcms_c_reset_bmac_done callback function
Empty functions are good candidates for removal.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-05 13:39:03 -07:00
Alwin Beukers 23ed011ea9 staging: brcm80211: made NULL ethernet address const
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-05 13:39:02 -07:00
Alwin Beukers d64bc7c286 staging: brcm80211: fixed function returns
- removed unneeded return statements at end of functions.
- changed return value of brcms_c_radio_monitor_start to void.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-05 13:39:02 -07:00
Alwin Beukers e9d3adbef4 staging: brcm80211: removed accessor functions for band type and etheraddress.
Functions were trivial so not really adding value.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-05 13:39:02 -07:00
Alwin Beukers 406f8d656c staging: brcm80211: fixed checkpatch warnings
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-05 13:39:02 -07:00
Franky Lin ef8299ddee staging: brcm80211: stop using assigned thread priority in fullmac
Stop assigning priority to watchdog and dpc threads. Remove related
code.

Reviewed-by: Arend van Spriel <arend@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-05 13:39:01 -07:00
Franky Lin a3b0b566cd staging: brcm80211: remove fullmac module_param for intr/poll mode
Use constant for interrupt/polling mode configuration.

Reviewed-by: Arend van Spriel <arend@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-05 13:39:01 -07:00
Franky Lin 019f45f274 staging: brcm80211: clean up rtnl_lock in fullmac
rtnl lock is used improperly in fullmac. This patch intends to clean
them up.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Sukesh Srikakula <sukeshs@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-05 13:39:01 -07:00
Roland Vossen c18692e701 staging: brcm80211: fullmac: fixed double #include
Fix double include as detected by checkincludes script.

Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-05 13:39:01 -07:00
Arend van Spriel e6cfdf6850 staging: brcm80211: replace brcmu_bitcount with hweight8
The kernel provides bit operations to replace brcmu_bitcount so
using those instead.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-05 13:39:01 -07:00
Arend van Spriel 412e4fdf12 staging: brcm80211: remove brcmu_bprintf and related functions
The functions brcmu_bprintf and brcmu_binit could be replaced by
snprintf kernel function. These are no longer used in both brcm80211
drivers so they have been removed.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-05 13:39:00 -07:00
Arend van Spriel 67064f27ab staging: brcm80211: remove filtering of received frames
In the receive path of the brcmsmac driver probe request frames and
frames with invalid mac address fields are dropped. This is only
fine for STA mode. Anticipating coming AP and monitor mode functionality
this is unwanted behavior.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-05 13:39:00 -07:00
Arend van Spriel 215f311b5b staging: brcm80211: remove setting ssn to zero upon AMPDU_TX_START
The ssn should be given a valid value by the driver or it should not
override the value. Removed override to zero from the driver.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-05 13:39:00 -07:00
Roland Vossen 4d8daa6b77 staging: brcm80211: cleaned up struct brcms_bss_cfg
Several fields were unused or were only set once. They have been
removed. Uncalled functions that relied on these constants have been
removed as well.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-05 13:39:00 -07:00
Mark Einon 8481085a83 staging: et131x: Fix indefinite low power sleep
The mechanism by which the device is put into low power sleep is broken
in that the device can never come back out of low power mode afterwards.
Temorary fix to bring the device back out of sleep almost immediately,
until a suitable wake trigger can be found.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-04 10:43:15 -07:00
Mark Einon 86d734fd1e staging: et131x: Updating copyright statements and module authors
Adding copyright notices and adding myself as a module author.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-04 10:43:14 -07:00
Mark Einon 92c31a43e1 staging: et131x: Update TODO file for kernel parameters
set_mac is implemented, and there have been lots of new ethtool_ops added, so
removing the TODO to add more kernel parameters.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-04 10:43:14 -07:00
Mark Einon d84b7e29d8 staging: et131x: Fix add_timer() from et131x_open
The error_timer was only getting initialised and an initial jiffies value set following a probe.
This could result in the timer needlessly expiring immediately after et131x_open is called.
Now this is all done from the open call instead.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-04 10:43:14 -07:00
Mark Einon 25e1c2780c staging: et131x: Add pci suspend & resume functions
Added basic suspend & resume functionality.
Tested on an et1310 device, and putting Fedora15 host in and out of
hibernation successfully.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-04 10:43:13 -07:00
Mark Einon 1ce664dc01 staging: et131x: Remove adapter->bmsr, replace with phydev equivalents
adapter->bmsr is no longer being updated, but is also used to check the link state in places.

Remove bmsr from adapter, and replace link state checks with phydev->link check.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-04 10:43:13 -07:00
Mark Einon a3bf5fa772 staging: et131x: Introduce et1310_in_phy_coma() call
In several places in the code, the pm_csr register is read and the PHY_SW_COMA bit checked.

Move this check into its own small function to make the code more readable.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-04 10:43:12 -07:00
Mark Einon 53c3ee0db3 staging: et131x: Remove TODO entry 'alloc_etherdev initilising memory with zero'
Removing this as I'm pretty sure its not true, and alloc_etherdev isn't provided by this driver anyway. Alternatively, its a badly written comment and I don't understand it.

This drivers use of alloc_etherdev() is within keeping with other net devices, so I'm happy.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-04 10:43:12 -07:00
David Kilroy c6a2417459 staging: wlags49_h2: Remove bad debug message
The message is in the wrong place. We definitely don't want to
return at this point, as we may need to turn off encryption.

Reported-by: Henk de Groot <pe1dnn@amsat.org>
Signed-off-by: David Kiroy <kilroyd@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-04 10:41:07 -07:00
David Kilroy 268b06ac8b staging: wlags49_h2: Remove unused debug function
The function no longer compiles, so we just remove it.

Reported-by: Henk de Groot <pe1dnn@amsat.org>
Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-04 10:41:07 -07:00
David Kilroy 8bf90539d6 staging: wlags49_h2: Use C99 __func__
in DBG machinery so you don't have to declare DBG_FUNC at
the start of all functions.

This just makes it easy to add DBG conforming to existing code.

The patch reformats the changed #defines to satisfy checkstyle.pl

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-04 10:41:06 -07:00
K. Y. Srinivasan 41598a0b71 Staging: hv: mousevsc: Get rid of unnecessary comments
Get rid of unnecessary comments.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-04 10:39:39 -07:00
K. Y. Srinivasan 1eadd8c286 Staging: hv: mousevsc: Enable autoloading of the mouse driver
Now that the mouse driver is functional, enable the auto-loading of the driver.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-04 10:39:39 -07:00
K. Y. Srinivasan 929ad795f0 Staging: hv: mousevsc: Cleanup mousevsc_on_device_add()
Cleanup  mousevsc_on_device_add().

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-04 10:39:38 -07:00
K. Y. Srinivasan 6e56f27c09 Staging: hv: mousevsc: Get rid of mousevsc_on_receive_input_report() by inlining
Get rid of mousevsc_on_receive_input_report() by inlining the code.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-04 10:39:38 -07:00
K. Y. Srinivasan 517812b448 Staging: hv: mousevsc: Cleanup camel cased enums
Cleanup all camel cased names.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-04 10:39:38 -07:00
K. Y. Srinivasan ee2baa299a Staging: hv: mousevsc: Get rid of ref_count state in struct mousevsc_dev
Now get rid of the machinery for managing the life-cycle of the mousevsc_dev
as this is not needed.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-04 10:39:37 -07:00
K. Y. Srinivasan c411f17daf Staging: hv: mousevsc: Now cleanup mousevsc_remove()
Now, cleanup mousevsc_remove(). The mouse driver once initialized only
receives data from the host. So, by closing the channel first in the
unload path, we can properly deal with inflight packets. So, we don't need
the machinery for managing the life-cycle of the mousevsc_dev object.
Get rid of the unnecessary code.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-04 10:39:37 -07:00
K. Y. Srinivasan 8ec31f9385 Staging: hv: mousevsc: Get rid of mousevsc_on_device_remove() by inlining code
Get rid of mousevsc_on_device_remove() by inlining code.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-04 10:39:36 -07:00
K. Y. Srinivasan 8660e38fab Staging: hv: mousevsc: Cleanup mousevsc_connect_to_vsp()
Cleanup mousevsc_connect_to_vsp(). There is no need to take reference on the
mousevsc device object when we are setting up the device. As part of this
cleanup get rid of get_input_device() as this function is only used here.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-04 10:39:36 -07:00
K. Y. Srinivasan 1486dd0d0a Staging: hv: mousevsc: Get rid of mousevsc_on_send_completion()
We don't need to handle the "send complete" callback - nothing needs to be done
here; get rid of the code.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-04 10:39:35 -07:00
K. Y. Srinivasan bdbbdb2d63 Staging: hv: mousevsc: Cleanup alloc_input_device()
Cleanup alloc_input_device(); you can directly set the reference count.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-04 10:39:34 -07:00
K. Y. Srinivasan c5b71fc71f Staging: hv: mousevsc: Get rid of the unused state: num_outstanding_req
Get rid of the unused state: num_outstanding_req in struct mousevsc_dev.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-04 10:39:34 -07:00
K. Y. Srinivasan ea8646b92f Staging: hv: mousevsc: Free allocated memory in free_input_device()
Free all allocated memory in free_input_device().

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-04 10:39:34 -07:00
K. Y. Srinivasan 61c4fb47cf Staging: hv: mousevsc: Get rid of unnecessary pr_* calls
Get rid of unnecessary pr_* calls.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-04 10:39:34 -07:00
K. Y. Srinivasan 5cd4d0302c Staging: hv: mousevsc: Cleanup error handling
Cleanup error handling in this driver; use standard Linux error codes.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-04 10:39:33 -07:00
K. Y. Srinivasan 0b1f0da005 Staging: hv: mousevsc: Get rid of unnecessary DPRINT calls
Get rid of unnecessary DPRINT calls.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-04 10:39:33 -07:00
K. Y. Srinivasan da5969e4cc Staging: hv: mousevsc: Cleanup and properly implement reportdesc_callback()
Cleanup and properly implement reportdesc_callback(); properly allocate the
hid_device and properly initialize the hid device structure.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-04 10:39:33 -07:00
K. Y. Srinivasan 622a50dce0 Staging: hv: mousevsc: Use completion primitive to synchronize
Use completion primitive to synchronize.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-04 10:39:32 -07:00
K. Y. Srinivasan 1738067e5d Staging: hv: mousevsc: Correctly initialize the header size
Correctly initialize the header size.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-04 10:39:32 -07:00
K. Y. Srinivasan 60e8615ad6 Staging: hv: mousevsc: Handle the case where we may get bogus report desc size
Handle the case where we may get bogus report desc size from the host.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-04 10:39:32 -07:00
K. Y. Srinivasan 01584892db Staging: hv: mousevsc: Change the allocation flags to reflect interrupt context
Change the allocation flags to reflect interrupt context.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-04 10:39:32 -07:00
K. Y. Srinivasan 7f2bad4bd0 Staging: hv: mousevsc: Fixup some bogus WARN_ON() calls
Fix the bogus WARN_ON() calls.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-04 10:39:31 -07:00
K. Y. Srinivasan 28e0d06655 Staging: hv: mousevsc: Get rid of the struct input_device_context
The state maintained in struct input_device_context can easily be included
in the struct mousevsc_dev structure. Simplify the code by consolidating
the state.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-04 10:39:31 -07:00
K. Y. Srinivasan 870e53adbd Staging: hv: mousevsc: Fixup struct hv_input_dev_info
This structure is protocol defined structure and must match the definition
on the host side. Make appropriate adjustments.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-04 10:39:30 -07:00
Jonathan Cameron 9d5d11539a staging: iio: if(__LITTLE_ENDIAN) -> #ifdef __LITTLE_ENDIAN
Unsuprisingly this symbol isn't defined on big endian systems.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-04 10:37:06 -07:00
Stephen Rothwell 81e07c06e6 staging: r8712u: include module.h where needed
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-04 10:37:06 -07:00
Stephen Rothwell 6a37b041d2 staging: iio: adc: add includes of module.h and stat.h
fixes these build problems:

drivers/staging/iio/adc/ad7746.c:345:8: error: 'S_IWUSR' undeclared here (not in a function)
drivers/staging/iio/adc/ad7746.c:436:8: error: 'S_IRUGO' undeclared here (not in a function)
drivers/staging/iio/adc/ad7746.c:681:19: error: 'THIS_MODULE' undeclared here (not in a function)
drivers/staging/iio/adc/ad7746.c:778:1: warning: data definition has no type or storage class [enabled by default]
drivers/staging/iio/adc/ad7746.c:778:1: warning: type defaults to 'int' in declaration of 'MODULE_DEVICE_TABLE' [-Wimplicit-int]
drivers/staging/iio/adc/ad7746.c:778:1: warning: parameter names (without types) in function declaration [enabled by default]
drivers/staging/iio/adc/ad7746.c:799:15: error: expected declaration specifiers or '...' before string constant
drivers/staging/iio/adc/ad7746.c:800:20: error: expected declaration specifiers or '...' before string constant
drivers/staging/iio/adc/ad7746.c:801:16: error: expected declaration specifiers or '...' before string constant

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-04 10:37:05 -07:00
Roland Vossen 358830e372 staging: brcm80211: removed functionality to disable N mode
NVRAM contains a parameter that can disable N mode. This functionality
is not needed. As a consequence, brcms_c_protection_upd() could be
simplified.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-03 16:16:51 -07:00
Roland Vossen 44a94f62f1 staging: brcm80211: cleaned up buffer len defines in fullmac
Code cleanup. Replaced identical definition BRCMF_C_DCMD_MAXLEN
by BRCMF_DCMD_MAXLEN. Renamed related buffer len definitions.

Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-03 16:16:51 -07:00
Roland Vossen 2228b27da6 staging: brcm80211: renamed ioctl functions/structs to dcmd
The fullmac dongle communicates with the driver using certain codes. These
codes were named 'ioctls' in the code, but this term is confusing since
it is used in kernel<->driver context. The term 'ioctl' has been replaced
with 'dcmd' for 'dongle command'.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-03 16:16:50 -07:00
Roland Vossen 8ff3a89684 staging: brcm80211: removed 'enforce_mutex' parameter in fullmac
Parameter was always called with the value 'true'.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-03 16:16:50 -07:00
Roland Vossen 9ee777a558 staging: brcm80211: removed fullmac function brcmf_bus_devreset()
Function is not called anymore.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-03 16:16:50 -07:00
Roland Vossen 4be9393fb8 staging: brcm80211: removed unused softmac mimo disable code
No element in array locale_bn[] has the 'no mimo' flag bit set.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-03 16:16:50 -07:00
Roland Vossen 93a03c62ed staging: brcm80211: removed unused fullmac spinlock
Usage of spinlock depended on module parameters that are going to
be removed in a subsequent patch. Parameter wlc->threads_only is
always 'true'.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Reviewed-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-03 16:16:50 -07:00
Arend van Spriel 8b36ac445a staging: brcm80211: reducing indentation levels in bcmsdh_sdmmc.c
Some functions in the source file had a lot of indentation levels
forcing statements to be spread over multiple lines impairing the
readability of the code.

Reported-by: Joe Perches <joe@perches.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-03 16:16:49 -07:00
Roland Vossen 9f3697f950 staging: brcm80211: reduce indentation level in dhd_sdio.c #3
By introducing 1 new function.

Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-03 16:16:49 -07:00
Roland Vossen 800c2b6750 staging: brcm80211: reduce indentation level in dhd_sdio.c #2
By introducing 1 new function.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-03 16:16:49 -07:00
Roland Vossen 875176bb0b staging: brcm80211: reduce indentation level in dhd_sdio.c #1
By introducing two new functions.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-03 16:16:49 -07:00
Arend van Spriel 683fbb4239 staging: brcm80211: only allow one call to add_interface callback
The driver only supports one network interface to be associated
with it. Only for the first call it does actually something. For
subsequent calls it does return -ENODEV error code.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-03 16:16:48 -07:00
Roland Vossen 71e233a2ab staging: brcm80211: added __iomem qualifier to softmac phy
Code cleanup. Makes it clear when an address is mapped IO space.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-03 16:16:48 -07:00
Roland Vossen ffa1350e50 staging: brcm80211: added __iomem qualifier to softmac dma.c
Code cleanup. Makes it clear when an address is mapped IO space.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-03 16:16:48 -07:00
Roland Vossen d892735338 staging: brcm80211: added __iomem qualifier to softmac main.c
Code cleanup. Makes it clear when an address is mapped IO space.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-03 16:16:48 -07:00
Roland Vossen f2ac3b297d staging: brcm80211: reduced softmac sparse warnings
By declaring certain variables static. One unused array induced a warning,
array was deleted.

Reviewed-by: Arend van Spriel <arend@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-03 16:16:47 -07:00
Roland Vossen 9d1b113e2b staging: brcm80211: various __iomem additions to softmac.
So it is clear to the reader what memory is IO mapped

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-03 16:16:47 -07:00
Roland Vossen 24cca4aafb staging: brcm80211: cleaning up tx rate control code in softmac
Code cleanup. Code was unnecessarily complex.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-03 16:16:47 -07:00
Roland Vossen 7983a5a7ff staging: brcm80211: removed unused smac tx ampdu packet queue
A remnant of the past.

Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-03 16:16:46 -07:00
Roland Vossen 3e8eda4447 staging: brcm80211: removed some unused fmac variable declarations
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-03 16:16:46 -07:00
Roland Vossen c4aa147ac3 staging: brcm80211: declared global vars in softmac phy as const
Global variables are undesirable unless they are read only.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-03 16:12:33 -07:00
Roland Vossen 5c0fd595e2 staging: brcm80211: simple changes to softmac phy variables
Code cleanup resulting in less sparse warnings.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-03 16:12:33 -07:00
Arend van Spriel e4e2f462ae staging: brcm80211: use d11rxhdr structure in brcms_c_recover_tsf64()
All information needed for this function is available in the d11rxhdr
structure. This is the last place where the brcms_d11rxhdr structure
so it can be removed.

Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-03 16:12:32 -07:00
Arend van Spriel 28bb0f60ce staging: brcm80211: move rssi computation to place we need it
The rssi computation was done upon getting the frame from the
queue, but the value is needed when filling in the receive status
data for mac80211. The call to wlc_phy_rssi_compute() has been
deferred.

Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-03 16:12:32 -07:00
Arend van Spriel 776dddc52d staging: brcm80211: use endian annotated structures in brcmsmac
Structures interfacing with the device have a specific endianess and
structures exchanged between host and device have been annotated so
sparse checking can be done. The Makefile has been modified to add
the __CHECK_ENDIAN__ flag.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-03 16:12:32 -07:00
Arend van Spriel f32f116bda staging: brcm80211: convert endianess before handling the frame
The received frame from the device is in little-endian order and
converted in the receive path. However, the phy code was doing
the rssi calculation with packet in LE order. This has been changed
to do the le_to_cpu conversion before doing the rssi computation
and further receive processing.

Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-03 16:12:32 -07:00
Arend van Spriel e053edb69a staging: brcm80211: change interface for common rssi compute function
The function wlc_phy_rssi_compute() now uses d11rxhdr struct as
purely input parameter and returns the computed rssi value.

Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-03 16:12:31 -07:00
Arend van Spriel d6cf28b310 staging: brcm80211: changing interface to n-phy rssi compute function
The function wlc_phy_rssi_compute_nphy() was called with pointer to
brcms_d11rxhdr structure in which it filled in the received power
per antenna. However, these are not used further in the driver so
it only needs the d11rxhdr structure as input for rssi calculation.

Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-03 16:12:31 -07:00
Roland Vossen e429e0b7f4 staging: brcm80211: removed global variable in softmac otp
Placed variable on the stack instead and deleted unused functions.
Softmac was tested to function properly with multiple adapters in one
system.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-03 16:12:31 -07:00
Roland Vossen 3cfbbacd81 staging: brcm80211: various global var related changes in softmac
Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-03 16:12:31 -07:00
Roland Vossen 3568a0a0e7 staging: brcm80211: removed global var global_scb from softmac
Global variables are undesirable unless they are read only. Removed by
instead using an already defined Station Control Block variable in a
per-device structure.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-03 16:12:31 -07:00
Roland Vossen f9be749278 staging: brcm80211: removed band related global vars from softmac
Global variables are undesirable unless they are read only. Variables are
now maintained in a device specific structure.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-03 16:12:31 -07:00
Arend van Spriel 8298f41150 staging: brcm80211: remove unnecessary mac80211 callbacks
Several callback were implemented without executing any further
function calls into the driver. Review feedback indicated that
these could be removed.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-03 16:12:30 -07:00
Arend van Spriel 3e02a77a52 staging: brcm80211: remove dongle firmware related debug code
When the device dies the driver could extract cpu registers on
the device to analyze the trap handling on the dongle. As the
firmware with this driver is stable this code does not belong
in the brcmfmac driver.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-03 16:12:30 -07:00
Arend van Spriel 4c5af8e260 staging: brcm80211: make device initializer table for wme constant
For chip initialisation of the wme parameters a table is used, but
it was not marked as constant.

Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-03 16:12:30 -07:00
Arend van Spriel 25d3f4bc66 staging: brcm80211: remove unused function si_pmu_ilp_clock()
The function is not used in the driver and has been removed.

Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-03 16:12:30 -07:00
Arend van Spriel 2f74156c9d staging: brcm80211: use fragment number provided in transmit frame
In the transmit path the field seq_ctrl is filled in, but the fragment
number was not properly determined.

Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-03 16:12:29 -07:00
Arend van Spriel 3215b49415 staging: brcm80211: remove ht_cap field from brcms_c_info structure
The field ht_cap was typed ieee80211_ht_cap from ieee80211.h. This
contained little endian annotated field cap_info resulting in sparse
endian warnings. It turned out the driver was setting the field, but
it was actually never used. Therefore it has been removed.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-03 16:12:29 -07:00
Roland Vossen 261f992bce staging: brcm80211: removed unused softmac workaround
WAR16165 is only used on older PCI chips, the driver does not support
these chips.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-03 16:12:29 -07:00
Roland Vossen bce42cf3fa staging: brcm80211: removed global vars in softmac ucode handling
Moved global vars into a per-device structure.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-03 16:12:29 -07:00
Roland Vossen 0805095d6b staging: brcm80211: removed global var from aiutils.c
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-03 16:12:29 -07:00
Roland Vossen 52d63c393b staging: brcm80211: removed redundant wlc->cfg struct member
After initialization ('attach'), this struct member always pointed at
the same memory as wlc->bsscfg.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-03 16:12:28 -07:00
Roland Vossen 33f08bd814 staging: brcm80211: deleted unused array of bss configurations in softmac
List always had one element. Converted the array to a scalar.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-03 16:12:28 -07:00
Roland Vossen b65e0fdb10 staging: brcm80211: removed unused argument from softmac functions
Parameter 's2' was unused. Affected function was only used internally
to main.c and has been made static and moved above its callers.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-03 16:12:28 -07:00
Arend van Spriel 64fa3ddc34 staging: brcm80211: remove uncoditional code blocks from brcmsmac
Using a block statement to scope function variables is not
common in linux kernel development. Browsed through the brcmsmac
to remove those.

Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-03 16:12:28 -07:00
Paul Gortmaker 748b636c40 staging: add module.h to various iio drivers
Since they are assuming it is there implicitly and will fail otherwise
with things like:

drivers/staging/iio/impedance-analyzer/ad5933.c:816: warning: type
 defaults to ‘int’ in declaration of ‘MODULE_AUTHOR’

drivers/staging/iio/adc/ad7280a.c:990: warning: type defaults to ‘int’
 in declaration of ‘MODULE_AUTHOR’

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-03 16:07:51 -07:00
Lu Guanqun eeca83a74f staging: intel_sst: fix compile error
include module.h to fix the following compile errors:

drivers/staging/intel_sst/intelmid.c:52: error: expected declaration specifiers or '...' before string constant
drivers/staging/intel_sst/intelmid.c:52: warning: data definition has no type or storage class
drivers/staging/intel_sst/intelmid.c:52: warning: type defaults to 'int' in declaration of 'MODULE_AUTHOR'
drivers/staging/intel_sst/intelmid.c:52: warning: function declaration isn't a prototype
drivers/staging/intel_sst/intelmid.c:53: error: expected declaration specifiers or '...' before string constant
drivers/staging/intel_sst/intelmid.c:53: warning: data definition has no type or storage class
drivers/staging/intel_sst/intelmid.c:53: warning: type defaults to 'int' in declaration of 'MODULE_AUTHOR'
drivers/staging/intel_sst/intelmid.c:53: warning: function declaration isn't a prototype
drivers/staging/intel_sst/intelmid.c:54: error: expected declaration specifiers or '...' before string constant
drivers/staging/intel_sst/intelmid.c:54: warning: data definition has no type or storage class
drivers/staging/intel_sst/intelmid.c:54: warning: type defaults to 'int' in declaration of 'MODULE_AUTHOR'
drivers/staging/intel_sst/intelmid.c:54: warning: function declaration isn't a prototype
drivers/staging/intel_sst/intelmid.c:55: error: expected declaration specifiers or '...' before string constant
drivers/staging/intel_sst/intelmid.c:55: warning: data definition has no type or storage class
drivers/staging/intel_sst/intelmid.c:55: warning: type defaults to 'int' in declaration of 'MODULE_AUTHOR'
drivers/staging/intel_sst/intelmid.c:55: warning: function declaration isn't a prototype
drivers/staging/intel_sst/intelmid.c:56: error: expected declaration specifiers or '...' before string constant
drivers/staging/intel_sst/intelmid.c:56: warning: data definition has no type or storage class
drivers/staging/intel_sst/intelmid.c:56: warning: type defaults to 'int' in declaration of 'MODULE_DESCRIPTION'
drivers/staging/intel_sst/intelmid.c:56: warning: function declaration isn't a prototype
drivers/staging/intel_sst/intelmid.c:57: error: expected declaration specifiers or '...' before string constant
drivers/staging/intel_sst/intelmid.c:57: warning: data definition has no type or storage class
drivers/staging/intel_sst/intelmid.c:57: warning: type defaults to 'int' in declaration of 'MODULE_LICENSE'
drivers/staging/intel_sst/intelmid.c:57: warning: function declaration isn't a prototype
drivers/staging/intel_sst/intelmid.c:58: error: expected declaration specifiers or '...' before string constant
drivers/staging/intel_sst/intelmid.c:58: warning: data definition has no type or storage class
drivers/staging/intel_sst/intelmid.c:58: warning: type defaults to 'int' in declaration of 'MODULE_SUPPORTED_DEVICE'
drivers/staging/intel_sst/intelmid.c:58: warning: function declaration isn't a prototype
drivers/staging/intel_sst/intelmid.c:64: error: expected ')' before 'int'
drivers/staging/intel_sst/intelmid.c:65: error: expected ')' before string constant
drivers/staging/intel_sst/intelmid.c:66: error: expected ')' before numeric constant
drivers/staging/intel_sst/intelmid.c:67: error: expected ')' before string constant
drivers/staging/intel_sst/intelmid.c:461: warning: data definition has no type or storage class
drivers/staging/intel_sst/intelmid.c:461: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL_GPL'
drivers/staging/intel_sst/intelmid.c:461: warning: parameter names (without types) in function declaration
drivers/staging/intel_sst/intelmid.c:475: warning: data definition has no type or storage class
drivers/staging/intel_sst/intelmid.c:475: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL_GPL'
drivers/staging/intel_sst/intelmid.c:475: warning: parameter names (without types) in function declaration
drivers/staging/intel_sst/intelmid.c: In function 'snd_intelmad_probe':
drivers/staging/intel_sst/intelmid.c:859: error: 'THIS_MODULE' undeclared (first use in this function)
drivers/staging/intel_sst/intelmid.c:859: error: (Each undeclared identifier is reported only once
drivers/staging/intel_sst/intelmid.c:859: error: for each function it appears in.)
drivers/staging/intel_sst/intelmid.c: At top level:
drivers/staging/intel_sst/intelmid.c:989: error: 'THIS_MODULE' undeclared here (not in a function)

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Lu Guanqun <guanqun.lu@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-03 16:07:50 -07:00
Jonathan Cameron 85da50596d staging:iio:imu:adis16400 rename adis16344 -> adis16334.
Part never existed under that name. Ooops

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-03 16:07:05 -07:00
Jonathan Cameron 31bf47d518 staging:iio:adc:ad7887 stop using IIO_CHAN macro.
It's going away.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-03 16:07:05 -07:00
Jonathan Cameron 3f0676a874 staging:iio:adc:ad7606 remove unused chip info elements.
These are now handled through the chan_spec arrays and no one
is using them anymore.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-03 16:07:05 -07:00
Jonathan Cameron 8cbb36a023 staging:iio:adc:ad7606 refactor to remove st->irq and st->id.
id wasn't used anywhere and st->irq can be removed by simply
passing it into the core remove function (trivially available in
the two bus implementations).

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-03 16:07:05 -07:00
Jonathan Cameron 4f5495d0a5 staging;iio:adc:ad7606 use iio_sw_buffer_preenable rather than local equiv
Other than a few slight refactorings the local version was pretty standard
so replace it and rework to get rid of st->d_size which it setup.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-03 16:07:04 -07:00
Jonathan Cameron 68b41aefa3 staging:iio:adc:ad7606 make gpio request failures more consistent
To my mind, if a gpio is specified in the board file, yet fails
to be successfully requested, that is an error condidtion and
the driver should not muddle on regardless.

This does mean unwinding the gpios on error. Also the free_gpios
function is reordered so that it is consistent with the request one
(reverse order obviously).

This patch is the category of not technically fixing anything, just
making the driver be more in line with what a reviewer will expect.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-03 16:07:04 -07:00
Jonathan Cameron 0b89525dfc staging:iio:adc:ad7606 trivial code style fix.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-03 16:07:04 -07:00
Jonathan Cameron 50ac23be39 staging:iio:adc:ad7606 add local define for chan_spec structures.
IIO_CHAN is being phased out and in this case things are so
simple it makes sense to have a local one parameter equivalent.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-03 16:07:03 -07:00
Jonathan Cameron 58dffaeddd staging:iio:adc:ad799x address and scan_index always match so stop using address
Saves on setting the value of address for the simple situation seen in this
device. They are already used interchangably to get data from the buffer.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-03 16:07:03 -07:00
Jonathan Cameron b79c9a3c1e staging:iio:adc:ad799x set the device name only once.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-03 16:07:03 -07:00
Jonathan Cameron 231c5c3b8b staging:iio:adc:ad799x use the core handling for as much of the events as possible.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-03 16:07:02 -07:00
Jonathan Cameron f2a634291e staging:iio:adc:ad799x avoid bouncing back and forth from iio_priv space.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-03 16:07:02 -07:00
Jonathan Cameron 24cba40615 staging:iio:adc:ad799x use a table for frequency values rather than big switch.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-03 16:07:02 -07:00
Jonathan Cameron 5357ba3df4 staging:iio:adc:ad799x trivial: use the convenient chan struct.
This is much cleaner than bouncing through the various structures
to get to the same thing.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-03 16:07:02 -07:00