GitHub/mt8127/android_kernel_alcatel_ttab.git
13 years agostaging: brcm80211: replace brcmu_bitcount with hweight8
Arend van Spriel [Tue, 4 Oct 2011 21:18:51 +0000 (23:18 +0200)]
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>
13 years agostaging: brcm80211: remove brcmu_bprintf and related functions
Arend van Spriel [Tue, 4 Oct 2011 21:18:50 +0000 (23:18 +0200)]
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>
13 years agostaging: brcm80211: remove filtering of received frames
Arend van Spriel [Tue, 4 Oct 2011 21:18:49 +0000 (23:18 +0200)]
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>
13 years agostaging: brcm80211: remove setting ssn to zero upon AMPDU_TX_START
Arend van Spriel [Tue, 4 Oct 2011 21:18:48 +0000 (23:18 +0200)]
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>
13 years agostaging: brcm80211: cleaned up struct brcms_bss_cfg
Roland Vossen [Tue, 4 Oct 2011 21:18:47 +0000 (23:18 +0200)]
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>
13 years agostaging: et131x: Fix indefinite low power sleep
Mark Einon [Sat, 1 Oct 2011 10:14:17 +0000 (11:14 +0100)]
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>
13 years agostaging: et131x: Updating copyright statements and module authors
Mark Einon [Sat, 1 Oct 2011 10:14:16 +0000 (11:14 +0100)]
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>
13 years agostaging: et131x: Update TODO file for kernel parameters
Mark Einon [Sat, 1 Oct 2011 10:14:15 +0000 (11:14 +0100)]
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>
13 years agostaging: et131x: Fix add_timer() from et131x_open
Mark Einon [Sat, 1 Oct 2011 10:14:14 +0000 (11:14 +0100)]
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>
13 years agostaging: et131x: Add pci suspend & resume functions
Mark Einon [Sat, 1 Oct 2011 10:14:13 +0000 (11:14 +0100)]
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>
13 years agostaging: et131x: Remove adapter->bmsr, replace with phydev equivalents
Mark Einon [Sat, 1 Oct 2011 10:14:12 +0000 (11:14 +0100)]
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>
13 years agostaging: et131x: Introduce et1310_in_phy_coma() call
Mark Einon [Sat, 1 Oct 2011 10:14:11 +0000 (11:14 +0100)]
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>
13 years agostaging: et131x: Remove TODO entry 'alloc_etherdev initilising memory with zero'
Mark Einon [Sat, 1 Oct 2011 10:14:10 +0000 (11:14 +0100)]
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>
13 years agostaging: wlags49_h2: Remove bad debug message
David Kilroy [Sat, 1 Oct 2011 08:43:50 +0000 (09:43 +0100)]
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>
13 years agostaging: wlags49_h2: Remove unused debug function
David Kilroy [Sat, 1 Oct 2011 08:43:49 +0000 (09:43 +0100)]
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>
13 years agostaging: wlags49_h2: Use C99 __func__
David Kilroy [Sat, 1 Oct 2011 08:43:48 +0000 (09:43 +0100)]
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>
13 years agoStaging: hv: mousevsc: Get rid of unnecessary comments
K. Y. Srinivasan [Thu, 29 Sep 2011 18:55:04 +0000 (11:55 -0700)]
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>
13 years agoStaging: hv: mousevsc: Enable autoloading of the mouse driver
K. Y. Srinivasan [Thu, 29 Sep 2011 18:55:03 +0000 (11:55 -0700)]
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>
13 years agoStaging: hv: mousevsc: Cleanup mousevsc_on_device_add()
K. Y. Srinivasan [Thu, 29 Sep 2011 18:55:02 +0000 (11:55 -0700)]
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>
13 years agoStaging: hv: mousevsc: Get rid of mousevsc_on_receive_input_report() by inlining
K. Y. Srinivasan [Thu, 29 Sep 2011 18:55:01 +0000 (11:55 -0700)]
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>
13 years agoStaging: hv: mousevsc: Cleanup camel cased enums
K. Y. Srinivasan [Thu, 29 Sep 2011 18:55:00 +0000 (11:55 -0700)]
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>
13 years agoStaging: hv: mousevsc: Get rid of ref_count state in struct mousevsc_dev
K. Y. Srinivasan [Thu, 29 Sep 2011 18:54:59 +0000 (11:54 -0700)]
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>
13 years agoStaging: hv: mousevsc: Now cleanup mousevsc_remove()
K. Y. Srinivasan [Thu, 29 Sep 2011 18:54:58 +0000 (11:54 -0700)]
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>
13 years agoStaging: hv: mousevsc: Get rid of mousevsc_on_device_remove() by inlining code
K. Y. Srinivasan [Thu, 29 Sep 2011 18:54:57 +0000 (11:54 -0700)]
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>
13 years agoStaging: hv: mousevsc: Cleanup mousevsc_connect_to_vsp()
K. Y. Srinivasan [Thu, 29 Sep 2011 18:54:56 +0000 (11:54 -0700)]
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>
13 years agoStaging: hv: mousevsc: Get rid of mousevsc_on_send_completion()
K. Y. Srinivasan [Thu, 29 Sep 2011 18:54:55 +0000 (11:54 -0700)]
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>
13 years agoStaging: hv: mousevsc: Cleanup alloc_input_device()
K. Y. Srinivasan [Thu, 29 Sep 2011 18:54:54 +0000 (11:54 -0700)]
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>
13 years agoStaging: hv: mousevsc: Get rid of the unused state: num_outstanding_req
K. Y. Srinivasan [Thu, 29 Sep 2011 18:54:53 +0000 (11:54 -0700)]
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>
13 years agoStaging: hv: mousevsc: Free allocated memory in free_input_device()
K. Y. Srinivasan [Thu, 29 Sep 2011 18:54:52 +0000 (11:54 -0700)]
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>
13 years agoStaging: hv: mousevsc: Get rid of unnecessary pr_* calls
K. Y. Srinivasan [Thu, 29 Sep 2011 18:54:51 +0000 (11:54 -0700)]
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>
13 years agoStaging: hv: mousevsc: Cleanup error handling
K. Y. Srinivasan [Thu, 29 Sep 2011 18:54:50 +0000 (11:54 -0700)]
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>
13 years agoStaging: hv: mousevsc: Get rid of unnecessary DPRINT calls
K. Y. Srinivasan [Thu, 29 Sep 2011 18:54:49 +0000 (11:54 -0700)]
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>
13 years agoStaging: hv: mousevsc: Cleanup and properly implement reportdesc_callback()
K. Y. Srinivasan [Thu, 29 Sep 2011 18:54:48 +0000 (11:54 -0700)]
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>
13 years agoStaging: hv: mousevsc: Use completion primitive to synchronize
K. Y. Srinivasan [Thu, 29 Sep 2011 18:54:47 +0000 (11:54 -0700)]
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>
13 years agoStaging: hv: mousevsc: Correctly initialize the header size
K. Y. Srinivasan [Thu, 29 Sep 2011 18:54:46 +0000 (11:54 -0700)]
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>
13 years agoStaging: hv: mousevsc: Handle the case where we may get bogus report desc size
K. Y. Srinivasan [Thu, 29 Sep 2011 18:54:45 +0000 (11:54 -0700)]
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>
13 years agoStaging: hv: mousevsc: Change the allocation flags to reflect interrupt context
K. Y. Srinivasan [Thu, 29 Sep 2011 18:54:44 +0000 (11:54 -0700)]
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>
13 years agoStaging: hv: mousevsc: Fixup some bogus WARN_ON() calls
K. Y. Srinivasan [Thu, 29 Sep 2011 18:54:43 +0000 (11:54 -0700)]
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>
13 years agoStaging: hv: mousevsc: Get rid of the struct input_device_context
K. Y. Srinivasan [Thu, 29 Sep 2011 18:54:42 +0000 (11:54 -0700)]
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>
13 years agoStaging: hv: mousevsc: Fixup struct hv_input_dev_info
K. Y. Srinivasan [Thu, 29 Sep 2011 18:54:41 +0000 (11:54 -0700)]
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>
13 years agostaging: iio: if(__LITTLE_ENDIAN) -> #ifdef __LITTLE_ENDIAN
Jonathan Cameron [Tue, 4 Oct 2011 15:02:08 +0000 (16:02 +0100)]
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>
13 years agostaging: r8712u: include module.h where needed
Stephen Rothwell [Tue, 4 Oct 2011 07:32:57 +0000 (18:32 +1100)]
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>
13 years agostaging: iio: adc: add includes of module.h and stat.h
Stephen Rothwell [Tue, 4 Oct 2011 07:21:11 +0000 (18:21 +1100)]
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>
13 years agostaging: brcm80211: removed functionality to disable N mode
Roland Vossen [Sun, 2 Oct 2011 17:14:45 +0000 (10:14 -0700)]
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>
13 years agostaging: brcm80211: cleaned up buffer len defines in fullmac
Roland Vossen [Sun, 2 Oct 2011 17:14:44 +0000 (10:14 -0700)]
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>
13 years agostaging: brcm80211: renamed ioctl functions/structs to dcmd
Roland Vossen [Sun, 2 Oct 2011 17:14:43 +0000 (10:14 -0700)]
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>
13 years agostaging: brcm80211: removed 'enforce_mutex' parameter in fullmac
Roland Vossen [Sun, 2 Oct 2011 17:14:42 +0000 (10:14 -0700)]
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>
13 years agostaging: brcm80211: removed fullmac function brcmf_bus_devreset()
Roland Vossen [Sun, 2 Oct 2011 17:14:41 +0000 (10:14 -0700)]
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>
13 years agostaging: brcm80211: removed unused softmac mimo disable code
Roland Vossen [Sun, 2 Oct 2011 17:14:40 +0000 (10:14 -0700)]
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>
13 years agostaging: brcm80211: removed unused fullmac spinlock
Roland Vossen [Sun, 2 Oct 2011 17:14:39 +0000 (10:14 -0700)]
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>
13 years agostaging: brcm80211: reducing indentation levels in bcmsdh_sdmmc.c
Arend van Spriel [Sun, 2 Oct 2011 17:14:38 +0000 (10:14 -0700)]
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>
13 years agostaging: brcm80211: reduce indentation level in dhd_sdio.c #3
Roland Vossen [Sun, 2 Oct 2011 17:14:37 +0000 (10:14 -0700)]
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>
13 years agostaging: brcm80211: reduce indentation level in dhd_sdio.c #2
Roland Vossen [Sun, 2 Oct 2011 17:14:36 +0000 (10:14 -0700)]
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>
13 years agostaging: brcm80211: reduce indentation level in dhd_sdio.c #1
Roland Vossen [Sun, 2 Oct 2011 17:14:35 +0000 (10:14 -0700)]
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>
13 years agostaging: brcm80211: only allow one call to add_interface callback
Arend van Spriel [Sun, 2 Oct 2011 17:14:34 +0000 (10:14 -0700)]
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>
13 years agostaging: brcm80211: added __iomem qualifier to softmac phy
Roland Vossen [Sun, 2 Oct 2011 17:14:33 +0000 (10:14 -0700)]
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>
13 years agostaging: brcm80211: added __iomem qualifier to softmac dma.c
Roland Vossen [Sun, 2 Oct 2011 17:14:32 +0000 (10:14 -0700)]
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>
13 years agostaging: brcm80211: added __iomem qualifier to softmac main.c
Roland Vossen [Sun, 2 Oct 2011 17:14:31 +0000 (10:14 -0700)]
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>
13 years agostaging: brcm80211: reduced softmac sparse warnings
Roland Vossen [Sun, 2 Oct 2011 17:14:30 +0000 (10:14 -0700)]
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>
13 years agostaging: brcm80211: various __iomem additions to softmac.
Roland Vossen [Sun, 2 Oct 2011 17:14:29 +0000 (10:14 -0700)]
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>
13 years agostaging: brcm80211: cleaning up tx rate control code in softmac
Roland Vossen [Sun, 2 Oct 2011 17:14:28 +0000 (10:14 -0700)]
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>
13 years agostaging: brcm80211: removed unused smac tx ampdu packet queue
Roland Vossen [Sun, 2 Oct 2011 17:14:27 +0000 (10:14 -0700)]
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>
13 years agostaging: brcm80211: removed some unused fmac variable declarations
Roland Vossen [Sun, 2 Oct 2011 17:14:26 +0000 (10:14 -0700)]
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>
13 years agostaging: brcm80211: declared global vars in softmac phy as const
Roland Vossen [Thu, 29 Sep 2011 22:34:36 +0000 (15:34 -0700)]
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>
13 years agostaging: brcm80211: simple changes to softmac phy variables
Roland Vossen [Thu, 29 Sep 2011 22:34:35 +0000 (15:34 -0700)]
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>
13 years agostaging: brcm80211: use d11rxhdr structure in brcms_c_recover_tsf64()
Arend van Spriel [Thu, 29 Sep 2011 22:34:34 +0000 (15:34 -0700)]
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>
13 years agostaging: brcm80211: move rssi computation to place we need it
Arend van Spriel [Thu, 29 Sep 2011 22:34:33 +0000 (15:34 -0700)]
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>
13 years agostaging: brcm80211: use endian annotated structures in brcmsmac
Arend van Spriel [Thu, 29 Sep 2011 22:34:32 +0000 (15:34 -0700)]
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>
13 years agostaging: brcm80211: convert endianess before handling the frame
Arend van Spriel [Thu, 29 Sep 2011 22:34:31 +0000 (15:34 -0700)]
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>
13 years agostaging: brcm80211: change interface for common rssi compute function
Arend van Spriel [Thu, 29 Sep 2011 22:34:30 +0000 (15:34 -0700)]
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>
13 years agostaging: brcm80211: changing interface to n-phy rssi compute function
Arend van Spriel [Thu, 29 Sep 2011 22:34:29 +0000 (15:34 -0700)]
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>
13 years agostaging: brcm80211: removed global variable in softmac otp
Roland Vossen [Thu, 29 Sep 2011 22:34:28 +0000 (15:34 -0700)]
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>
13 years agostaging: brcm80211: various global var related changes in softmac
Roland Vossen [Thu, 29 Sep 2011 22:34:27 +0000 (15:34 -0700)]
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>
13 years agostaging: brcm80211: removed global var global_scb from softmac
Roland Vossen [Thu, 29 Sep 2011 22:34:26 +0000 (15:34 -0700)]
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>
13 years agostaging: brcm80211: removed band related global vars from softmac
Roland Vossen [Thu, 29 Sep 2011 22:34:25 +0000 (15:34 -0700)]
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>
13 years agostaging: brcm80211: remove unnecessary mac80211 callbacks
Arend van Spriel [Thu, 29 Sep 2011 22:34:24 +0000 (15:34 -0700)]
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>
13 years agostaging: brcm80211: remove dongle firmware related debug code
Arend van Spriel [Thu, 29 Sep 2011 22:34:23 +0000 (15:34 -0700)]
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>
13 years agostaging: brcm80211: make device initializer table for wme constant
Arend van Spriel [Thu, 29 Sep 2011 22:34:22 +0000 (15:34 -0700)]
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>
13 years agostaging: brcm80211: remove unused function si_pmu_ilp_clock()
Arend van Spriel [Thu, 29 Sep 2011 22:34:21 +0000 (15:34 -0700)]
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>
13 years agostaging: brcm80211: use fragment number provided in transmit frame
Arend van Spriel [Thu, 29 Sep 2011 22:34:20 +0000 (15:34 -0700)]
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>
13 years agostaging: brcm80211: remove ht_cap field from brcms_c_info structure
Arend van Spriel [Thu, 29 Sep 2011 22:34:19 +0000 (15:34 -0700)]
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>
13 years agostaging: brcm80211: removed unused softmac workaround
Roland Vossen [Thu, 29 Sep 2011 22:34:18 +0000 (15:34 -0700)]
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>
13 years agostaging: brcm80211: removed global vars in softmac ucode handling
Roland Vossen [Thu, 29 Sep 2011 22:34:17 +0000 (15:34 -0700)]
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>
13 years agostaging: brcm80211: removed global var from aiutils.c
Roland Vossen [Thu, 29 Sep 2011 22:34:16 +0000 (15:34 -0700)]
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>
13 years agostaging: brcm80211: removed redundant wlc->cfg struct member
Roland Vossen [Thu, 29 Sep 2011 22:34:15 +0000 (15:34 -0700)]
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>
13 years agostaging: brcm80211: deleted unused array of bss configurations in softmac
Roland Vossen [Thu, 29 Sep 2011 22:34:14 +0000 (15:34 -0700)]
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>
13 years agostaging: brcm80211: removed unused argument from softmac functions
Roland Vossen [Thu, 29 Sep 2011 22:34:13 +0000 (15:34 -0700)]
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>
13 years agostaging: brcm80211: remove uncoditional code blocks from brcmsmac
Arend van Spriel [Thu, 29 Sep 2011 22:34:12 +0000 (15:34 -0700)]
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>
13 years agostaging: add module.h to various iio drivers
Paul Gortmaker [Fri, 30 Sep 2011 22:06:58 +0000 (18:06 -0400)]
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>
13 years agostaging: intel_sst: fix compile error
Lu Guanqun [Fri, 30 Sep 2011 02:35:35 +0000 (10:35 +0800)]
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>
13 years agostaging:iio:imu:adis16400 rename adis16344 -> adis16334.
Jonathan Cameron [Fri, 30 Sep 2011 09:05:45 +0000 (10:05 +0100)]
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>
13 years agostaging:iio:adc:ad7887 stop using IIO_CHAN macro.
Jonathan Cameron [Fri, 30 Sep 2011 09:05:44 +0000 (10:05 +0100)]
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>
13 years agostaging:iio:adc:ad7606 remove unused chip info elements.
Jonathan Cameron [Fri, 30 Sep 2011 09:05:43 +0000 (10:05 +0100)]
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>
13 years agostaging:iio:adc:ad7606 refactor to remove st->irq and st->id.
Jonathan Cameron [Fri, 30 Sep 2011 09:05:42 +0000 (10:05 +0100)]
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>
13 years agostaging;iio:adc:ad7606 use iio_sw_buffer_preenable rather than local equiv
Jonathan Cameron [Fri, 30 Sep 2011 09:05:41 +0000 (10:05 +0100)]
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>
13 years agostaging:iio:adc:ad7606 make gpio request failures more consistent
Jonathan Cameron [Fri, 30 Sep 2011 09:05:40 +0000 (10:05 +0100)]
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>
13 years agostaging:iio:adc:ad7606 trivial code style fix.
Jonathan Cameron [Fri, 30 Sep 2011 09:05:39 +0000 (10:05 +0100)]
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>
13 years agostaging:iio:adc:ad7606 add local define for chan_spec structures.
Jonathan Cameron [Fri, 30 Sep 2011 09:05:38 +0000 (10:05 +0100)]
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>
13 years agostaging:iio:adc:ad799x address and scan_index always match so stop using address
Jonathan Cameron [Fri, 30 Sep 2011 09:05:37 +0000 (10:05 +0100)]
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>
13 years agostaging:iio:adc:ad799x set the device name only once.
Jonathan Cameron [Fri, 30 Sep 2011 09:05:36 +0000 (10:05 +0100)]
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>