Commit Graph

6778 Commits

Author SHA1 Message Date
Justin P. Mattock
682a45382b staging: vt6656: main_usb.c remove one to many l's in the word.
The patch below removes an extra "l" in the word.

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-28 18:24:47 -08:00
Arend van Spriel
06d278c51a staging: brcm80211: remove usage of struct osl_info to access device
For accessing the PCI or SDIO device in the driver the device is stored
in a separate structure osl_info. To get rid of the osl concept the use
of this device pointer attribute is removed from the drivers.

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-02-28 18:20:35 -08:00
Arend van Spriel
7c0e45d7fb staging: brcm80211: remove NULL pointer checks before calling kfree
kfree function can handle NULL pointer as passed parameter so there
is no need for the calling function to check for this before calling
kfree.

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-02-28 18:19:56 -08:00
Arend van Spriel
6cab915077 staging: brcm80211: remove struct osl_info parameter from wlc_alloc
The functions within wlc_alloc had parameter of struct osl_info type
but it was never used. As part of osl concept removal this parameter
has been removed from the function prototypes.

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-02-28 18:19:55 -08:00
Arend van Spriel
d6075c9c0c staging: brcm80211: remove osl handle from pkttotlen function
The function pkttotlen was part of osl function and as such was
called with struct osl_info parameter although not used within
the function. As part of remove the whole osl concept from the
drivers this parameter has been removed from the function
prototype.

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-02-28 18:19:55 -08:00
Arend van Spriel
61044c4cef staging: brcm80211: remove checks for ANTSEL related compiler definitions
The source module antsel is always included in the current driver so
any checks for it being compiled in are redundant and have been removed.

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-02-28 18:19:54 -08:00
Arend van Spriel
16d691b60e staging: brcm80211: remove include file d11ucode_ext.h
Include file required by wl_ucode.h only so merged content of
d11ucode_ext.h into that include file to reduce number of include
files in the driver.

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-02-28 18:17:41 -08:00
Arend van Spriel
8a0939f500 staging: brcm80211: remove include file sbhndpio.h
All source files including sbhndpio.h were needing it only
because they needed d11.h and it had a dependency. The content
of sbhndpio.h has been merged in d11.h.

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-02-28 18:17:41 -08:00
Arend van Spriel
70dfb584a7 staging: brcm80211: remove include file proto/802.1d.h
Aim to reduce the number of source and include files. This
include file is not used anymore and can be removed.

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-02-28 18:17:40 -08:00
Arend van Spriel
44bb83af01 staging: brcm80211: remove typedef for struct wl_timer
Typedefinitions for structures are considered affecting the
code readability. This removes use of wl_timer_t which is
typedef for struct wl_timer.

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-02-28 18:17:39 -08:00
Arend van Spriel
12bacc1bce staging: brcm80211: remove typedefs that were flagged by checkpatch
The previous patch resulted in checkpatch to complain about 'new'
typedefs that were relocated to another include file. This commits
removes those typedef structures.

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-02-28 18:17:39 -08:00
Arend van Spriel
45575664fb staging: brcm80211: remove nested include statements
In order to analyze include file usage nested includes have been
removed from the driver sources.

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-02-28 18:17:38 -08:00
Arend van Spriel
62b54dca17 staging: brcm80211: cleanup function prototypes in header files
Several header files were specifying function prototypes although
no other module was relying on them. They have been moved to the
related source file and made static or removed if the functions
were non-existent in the driver.

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-02-28 18:17:38 -08:00
Arend van Spriel
b693380f61 staging: brcm80211: remove unused module from softmac driver
The softmac driver contained an event queue mechanism which
was properly initialized and queried but no event are ever
posted to it. Therefor the module has been removed.

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-02-28 18:15:04 -08:00
Brett Rudley
371d72a177 staging: brcm80211: relocate skb_get/free routines
Getting rid of os abstraction layer (ie. osl) is ongoing. Some
routines which are still required have been moved to bcmutils
module.

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-02-28 18:15:03 -08:00
Brett Rudley
235742ae4d staging: brcm80211: Remove abstraction of pci_(alloc/free)_consistent
The abstraction for allocating and freeing dma descriptor memory
has been removed and replaced by usage of pci_alloc_consistent and
pci_free_consistent.

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-02-28 18:15:03 -08:00
Brett Rudley
9010c46c37 staging: brcm80211: Remove abstractions for pci_(un)map_single
The driver had abstracted DMA mapping functions. As abstraction
is not required for the linux driver, these have been removed
and replaced by native linux functions.

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-02-28 18:13:36 -08:00
Stefan Weil
2d586ea6de staging: brcm80211: Fix memory leak after kmalloc failure
This error was spotted by cppcheck:

drivers/staging/brcm80211/phy/wlc_phy_lcn.c:4053: error: Memory leak: ptr

Cc: Brett Rudley <brudley@broadcom.com>
Cc: Henry Ptasinski <henryp@broadcom.com>
Cc: linux-wireless@vger.kernel.org
Cc: devel@driverdev.osuosl.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-28 18:07:19 -08:00
Roland Vossen
8d9e9d09b7 staging: brcm80211: removed compile warning
A warning was generated if CONFIG_BRCMDBG=n. Fixed this by introducing an
function.

Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-28 18:07:16 -08:00
Alan Cox
aa19d8e990 staging: gma500: Add 2D acceleration
This is taken from Richard Purdie's previous attempt to rip the heart out
of the PVR driver and stake it.

Accelerate copies and fills.

[Revised patch which disables the methods until we can finish debugging them]

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-28 17:59:56 -08:00
Pavan Savoy
b75ae07963 staging: delete ti-st from staging
The 2 drivers originally staged, the core ti-st driver
and the btwilink bluetooth driver have now moved to relevant
directories, so deleting the ti-st/ from staging.

Signed-off-by: Pavan Savoy <pavan_savoy@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-28 17:53:53 -08:00
Jonathan Cameron
14f983264a staging:iio:gyro: adis16060 cleanup, move to abi and bug fixes.
Moved to standard sysfs naming and got rid of direct register writing from
userspace.

The rx and tx buffers are never used together so just have one and avoid
the need to malloc it by using putting it in the state structure and
using the ____cacheline_aligned trick.

A number of obvious bugs also fixed and correction of register address
defines in header which has now been squashed into the driver.

I don't have one of these so can't test. This is done off datasheet.
Note that the driver had parts that definitely wouldn't work before
this patch.  Now it 'might' assuming I haven't messed up too badly.

I've left fixing the fact that you can only have one of these on a given
machine for another day.

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-02-28 17:50:15 -08:00
Jonathan Cameron
8e67875141 staging:iio:gyro: adis16130 cleanup, move to abi and bug fixes.
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-02-28 17:50:15 -08:00
Jonathan Cameron
a301d425e6 staging:iio:gyro remove adis16251 driver as now supported by adis16260 driver
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-02-28 17:48:50 -08:00
Jonathan Cameron
03d1b7d3e4 staging:iio:gyro: add adis16251 support to adis16260 driver
These parts are very similar and the adis16260 driver supports
a lot of additional functionality.

Precursor to removal of adis16251 driver.

Note that some supported devices were missing from Kconfig help text
and are also added 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-02-28 17:48:49 -08:00
Jonathan Cameron
35d2b6f9b1 staging:iio:gyro: adis16080 cleanup, move to abi and bug fixes.
Moved to standard sysfs naming and got rid of direct register writing
from userspace.

The rx and tx buffers are never used together so just have one and
avoid the need to malloc it by using putting it in the state structure
and using the ____cacheline_aligned trick.

Couple of obvious bug fixes whilst I was here.

I don't have one of these so can't test. This is done off datasheet.
Note that as with the adis16060 driver there are parts that definitely
wouldn't work before this patch.  Now it 'might' assuming I haven't
messed up too badly.

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-02-28 17:48:49 -08:00
Tomas Winkler
50e1fbdc1c staging/easycap: add first level indentation to easycap_ioctl.c
Add the first level indentation to easycap_testcard.c with astyle -t8.
About 100 of 80 columns warnings were left out for further fix

Cc: Mike Thomas <rmthomas@sciolus.org>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-28 15:24:19 -08:00
Tomas Winkler
abb46c8cc0 staging/easycap: add first level indentation to easycap_testcard.c
Add the first level indentation to easycap_testcard.c with astyle -t8.
No chackpatch warnings were created

Cc: Mike Thomas <rmthomas@sciolus.org>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-28 15:24:18 -08:00
Tomas Winkler
980aebddb6 staging/easycap: add first level indentation to easycap_sound_oss.c
Add first level indentation to easycap_sound_oss.c with astyle -t8
62 lines over 80 characters were left out for further fix

Cc: Mike Thomas <rmthomas@sciolus.org>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-28 15:24:18 -08:00
Tomas Winkler
a75af07718 staging/easycap: add first level indentation to easycap_sound.c
Add the first level indentation to easycap_sound.c with astyle -t8.
41 lines over 80 characters were left out for further fix

Cc: Mike Thomas <rmthomas@sciolus.org>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-28 15:24:17 -08:00
Tomas Winkler
c750665850 staging/easycap: add first level indentation to easycap_main
Add first level indentation to easayca_main.c
This created around 300 lines over 80 characters.
Around 100 of straight forward once were fixed in this patch.
The another 200 require more code movement and need to be fixed
later

Cc: Mike Thomas <rmthomas@sciolus.org>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-28 15:24:17 -08:00
Aaro Koskinen
6653eb317f staging: xgifb: delete unused module parameter "noaccel"
The parameter is not used by the driver.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-28 15:21:19 -08:00
Aaro Koskinen
26046bc16a staging: xgifb: delete XGI_accel.[ch]
The files contain nothing actually needed by the driver.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-28 15:21:18 -08:00
Aaro Koskinen
5b863c34ec staging: xgifb: eliminate "accel" field from video_info
The value is always false, so the field can be eliminated.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-28 15:21:18 -08:00
Aaro Koskinen
1b402967bc staging: xgifb: eliminate fbcon_XGI_fillrect()
fbcon_XGI_fillrect() implementation is trivial and can be replaced with
cfb_fillrect().

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-28 15:21:17 -08:00
Aaro Koskinen
85c3c562aa staging: xgifb: eliminate fbcon_XGI_copyarea()
fbcon_XGI_copyarea() implementation is trivial and can be replaced with
cfb_copyarea().

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-28 15:21:17 -08:00
Michael Hennerich
a2396dfc63 IIO: ADC: AD799x: Update timestamp handling
Add timestamp attributes.
Revise timestamp handling accordingly.
Preset timestamp generation.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-28 14:40:56 -08:00
Michael Hennerich
dcfb0863ee IIO: ADC: AD7606: Update timestamp handling
Add timestamp attributes.
Revise timestamp handling accordingly.
Preset timestamp generation.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-28 14:40:56 -08:00
Michael Hennerich
e08d02658c IIO: ADC: AD7887: Update timestamp handling
Add timestamp attributes.
Revise timestamp handling accordingly.
Preset timestamp generation.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-28 14:40:55 -08:00
Michael Hennerich
86f702ab1d IIO: ADC: AD7476: Update timestamp handling
Add timestamp attributes.
Revise timestamp handling accordingly.
Preset timestamp generation.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-28 14:40:55 -08:00
Michael Hennerich
fc7f95a946 IIO: Documentation: iio_utils: fix mask generation
Variable sizeint is used uninitialized.
Remove sizeint completely and use bits_used instead.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-28 14:40:24 -08:00
Michael Hennerich
7ccd4506fa IIO: Documentation: iio_utils: Prevent buffer overflow
The first part of build_channel_array()identifies the number of enabled channels.
Further down this count is used to allocate the ci_array. The next section parses the
scan_elements directory again, and fills ci_array regardless if the channel is enabled or not.
So if less than available channels are enabled ci_array memory is overflowed.

This fix makes sure that we allocate enough memory. But the whole approach looks a bit
cumbersome to me. Why not allocate memory for MAX_CHANNLES, less say 64
(I never seen a part with more than that channels). And skip the first part entirely.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-28 14:40:23 -08:00
Michael Hennerich
2bf99c70ce IIO: Documentation: iio_utils: style consistency fix
No functional changes

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-28 14:40:23 -08:00
Michael Hennerich
cb771cbdbd IIO: Documentation: iio_utils: Avoid double free()
filename is used and freed later

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-28 14:40:22 -08:00
Michael Hennerich
065896e904 IIO: Documentation: generic_buffer example: Avoid NULL pointer dereference
In case optarg n is not given return/exit

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-28 14:40:22 -08:00
Michael Hennerich
7c31b984c4 IIO: ADC: New driver for the AD7298 8-channel SPI ADC
This patch adds support for the
AD7298:  8-Channel, 1MSPS, 12-Bit SAR ADC with Temperature Sensor
via SPI bus.

This patch replaces the existing ad7298.c driver completely.
It was necessary since, the old driver did not comply with the
IIO ABI for such devices.

Changes since V1:
IIO: ADC: New driver for the AD7298 8-channel SPI ADC

Add documentation for new sysfs file tempX_input.
Simplify bit defines.
Remove outdated comments.
Fix indention style.
ad7298_show_temp():
	Add locking.
	Simplify temperature calculation.
	Change temperature result from degrees into milli degrees Celsius.
	Rename file according to new sysfs ABI documentation

Add timestamp attributes.
Revise timestamp handling accordingly.
Preset timestamp generation.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Reviewed-by: Shubhrajyoti <Shubhrajyoti@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-28 13:39:54 -08:00
Manohar Vanga
5bfcf90bfb staging: vme: remove unreachable code
Remove some more unreachable code found in bridges/vme_ca91cx42.c
and bridges/vme_tsi148.c

Signed-off-by: Manohar Vanga <manohar.vanga@cern.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-28 13:30:07 -08:00
Manohar Vanga
b004646779 staging: vme: remove unreachable code
Remove some unreachable code (kfree calls) from vme.c

Signed-off-by: Manohar Vanga <manohar.vanga@cern.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-28 13:30:07 -08:00
Greg Kroah-Hartman
0c3a6ede3c Staging: hv: add mouse driver
This driver adds mouse support to the hyper-v subsystem.

The code was originally written by Citrix, modified heavily by Hank at
Microsoft, and then further by me, to get it to build properly due to
all of the recent hyperv changes in the tree.

At the moment, it is marked "BROKEN" as it has not been tested well, and
it will conflict with other api changes that KY is doing, which I will
fix up later in this driver.

It still needs lots of work, and normal "cleanup".  I don't recommend
anyone running it on their machine unless they are very brave and know
how to debug kernel drivers in a hyperv system.

Signed-off-by:  Hank Janssen <hjanssen@microsoft.com>
Cc: K. Y. Srinivasan <kys@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-27 07:49:29 -08:00
Nils Faerber
50d1ae2f80 Staging: samsung-laptop: fix brightness level and add new device ids
The patch is against the 2.6.37 drivers/staging/samsung-laptop
driver and implements some extra enhancements.

It fixes an issue that the brightness would not change the level at
once as well as and some other oddities. It was resolved by
reallocated the SABI memory reagion using the "nocache" option.

The patch also introduces a new set of supported netbook models,
especially the NC10plus which was used for testing this patch. This new
set of models also offer 9 instead of just 8 brightness levels so it
also introduces an additional parameter for the models struct so that
models can define their own brightness range.

Signed-off-by: Nils Faerber <nils.faerber@kernelconcepts.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-27 07:24:10 -08:00
Riccardo Magliocchetti
8aa2bb4364 Staging: samsung-laptop: Add P460 to supported laptops
Signed-off-by: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-27 07:16:26 -08:00
Joe Perches
dc5ecf45f3 Staging: samsung-laptop: Constify samsung-laptop.c
Change sabi_config to const.
Reduces data, increases text ~200 bytes.

$ size drivers/platform/x86/samsung-laptop.o*
   text	   data	    bss	    dec	    hex	filename
   6933	   5084	   1560	  13577	   3509	drivers/platform/x86/samsung-laptop.o.new
   6765	   5252	   1560	  13577	   3509	drivers/platform/x86/samsung-laptop.o.old

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-27 07:16:26 -08:00
Greg Kroah-Hartman
00bfe272bb staging: samsung-laptop: address review comments
Fixed up the printk stuff to use pr_XXX where applicable, and reversed
the logic when testing for commands to complete properly.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-25 14:41:06 -08:00
Greg Kroah-Hartman
189b5d559c Staging: samsung-laptop: fix header address for N128
When doing the conversion to the "support more than one model" the
header address of the N128 was incorrectly copied.

This fixes the driver to work properly now on this laptop model.

Cc: Ingmar Steen <iksteen@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-25 14:32:26 -08:00
Roman Grebennikov
db559b079a staging: samsung-laptop: Add support for Samsung NP-X120/X170 laptop
Add Samsung NP-X120/X170 laptop DMI signature to samsung-laptop DMI table.

Signed-off-by: Roman Grebennikov <grebennikov.roman@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-25 13:37:52 -08:00
Greg Kroah-Hartman
9b5040be47 staging: samsung-laptop: add support for R519 laptops
Reported-by: Piotr Mitas <yabolus@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-25 13:36:01 -08:00
Greg Kroah-Hartman
e20b6f359a staging: samsung-laptop: add support for r70 laptops
Reported-by: Evgeny Bobkin <stwooe@mail.tu-berlin.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-25 13:32:42 -08:00
Richard Schütz
5f5b5c5185 staging: samsung-laptop: add support for N145P/N250P/N260P machines
Add DMI data for Samsung N145P/N250P/N260P

Signed-off-by: Richard Schütz <r.schtz@t-online.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-25 13:01:01 -08:00
Manohar Vanga
da1bbd1d85 staging: vme: fix loop condition
Fix loop condition in vme_register_bridge that results in an infinite
loop in the event that device_register fails.

Signed-off-by: Manohar Vanga <manohar.vanga@cern.ch>
Acked-by: Martyn Welch <martyn.welch@ge.com>
Acked-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-23 14:41:29 -08:00
Manohar Vanga
6012795b13 staging: vme: remove unreachable code
Removed some unreachable code from vme_register_bridge

Signed-off-by: Manohar Vanga <manohar.vanga@cern.ch>
Acked-by: Martyn Welch <martyn.welch@ge.com>
Acked-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-23 14:41:28 -08:00
Michael Hennerich
ea5dbf96db staging: IIO: trigger: New Blackfin specific trigger driver iio-trig-bfin-timer
This driver allows any Blackfin system timer to be used as IIO trigger.
It supports trigger rates from 0 to 100kHz in Hz resolution.

Changes since V1:
IIO: trigger: Apply review feedback

Add comment explaining Blackfin hardware timer configurations
Fix frequency_store, don't return -EINVAL for frequency set to 0

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-23 14:40:04 -08:00
Michael Hennerich
0772268aa9 staging: IIO: DAC: Add support for the AD5543/AD5553
Add support for the AD5543/AD5553 SPI 16-/14-Bit DACs
Fix typo in kconfig description

Changes since V1:
reorder Kconfig help text

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-23 14:40:04 -08:00
Michael Hennerich
b9618c0cac staging: IIO: ADC: New driver for AD7606/AD7606-6/AD7606-4
This patch adds support for the:
AD7606/AD7606-6/AD7606-4 8/6/4-Channel Data Acquisition
system (DAS) with 16-Bit, Bipolar, Simultaneous Sampling ADC.

Changes since V1:
IIO: ADC: New driver for AD7606/AD7606-6/AD7606-4: Apply review feedback

Rename sysfs node oversampling to oversampling_ratio.
Kconfig: Add GPIOLIB dependency.
Use range in mV to better match HWMON.
Rename ad7606_check_oversampling.
Fix various comments and style.
Reorder is_visible cases.
Use new gpio_request_one/array and friends.
Drop check for SPI max_speed_hz.

Changes since V2:
IIO: ADC: New driver for AD7606/AD7606-6/AD7606-4: Apply review feedback

Documentation: specify unit
Avoid raise condition in ad7606_scan_direct()
Check return value of bus ops read_block()

Changes since V3:
IIO: ADC: New driver for AD7606/AD7606-6/AD7606-4: Add missing include file

Add linux/sched.h

Changes since V4:
IIO: ADC: New driver for AD7606/AD7606-6/AD7606-4: Fix kconfig declaration

consistently use tristate to avoid configuration mismatches

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-23 14:40:03 -08:00
Randy Dunlap
6a3a81e7ca staging: fix olpc_dcon kconfig and build errors
drivers/staging/olpc_dcon/olpc_dcon_xo_1_5.c:106: error: 'acpi_gbl_FADT' undeclared (first use in this function)

Fixing that one gives:

ERROR: "backlight_device_register" [drivers/staging/olpc_dcon/olpc-dcon.ko] undefined!
ERROR: "registered_fb" [drivers/staging/olpc_dcon/olpc-dcon.ko] undefined!
ERROR: "lock_fb_info" [drivers/staging/olpc_dcon/olpc-dcon.ko] undefined!
ERROR: "backlight_device_unregister" [drivers/staging/olpc_dcon/olpc-dcon.ko] undefined!
ERROR: "num_registered_fb" [drivers/staging/olpc_dcon/olpc-dcon.ko] undefined!
ERROR: "fb_blank" [drivers/staging/olpc_dcon/olpc-dcon.ko] undefined!

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Chris Ball <cjb@laptop.org>
Cc: Jon Nettleton <jon.nettleton@gmail.com>
Acked-By: Andres Salomon <dilinger@queued.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-23 14:39:10 -08:00
Christopher Brannon
87be424a9a Staging: speakup: fix an out-of-bounds error.
The cur_item variable from keyhelp.c is an index into a table of
messages.  The following condition should always hold:
MSG_FUNCNAMES_START + cur_item <= MSG_FUNCNAMES_END.
The check in keyhelp.c was wrong.  It allowed cur_item to be
incremented to an out-of-bounds value.

Signed-off-by: Christopher Brannon <chris@the-brannons.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-23 14:39:09 -08:00
Marcin Slusarz
1af4791552 staging/et131x: fix et131x_rx_dma_disable halt_status usage
Commit 1bd751c1ab
("Staging: et131x: Clean up rxdma_csr") changed csr from bitfield to
u32, but failed to convert 2 uses of halt_status bit. It did:

- if (csr.bits.halt_status != 1)
+ if ((csr & 0x00020000) != 1)

which is wrong, because second version is always true.
Fix it.

This bug was found by coccinelle (http://coccinelle.lip6.fr/).

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Acked-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-23 14:39:09 -08:00
Aaro Koskinen
3f60554cb1 staging: xgifb: delete redundant XGIhw_ext fields
pSR and pCR fields can be deleted with no changes in the functionality.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-23 14:22:15 -08:00
Aaro Koskinen
7bc5e8374f staging: xgifb: delete dead code for skipping the video memory sizing
Delete dead code for skipping the video memory sizing.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-23 14:22:15 -08:00
Javier Martinez Canillas
da1545c0f2 Staging: xgifb: Remove unused function fbcon_XGI_sync
Due a cleanup in earlier patches, the function fbcon_XGI_sync now does nothing
so it has to be removed.

This patches removes the unused function.

Signed-off-by: Javier Martinez Canillas <martinez.javier@gmail.com>
Acked-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-23 14:19:33 -08:00
Javier Martinez Canillas
522f1f63cf Staging: xgifb: Remove unused spinlock in struct video_info
xgifb framebuffer driver had an option to use an accelerator engine that never
got used (XGIfb_accel was always 0).

An earlier patchset removed the code relevant to the accelerator.
Since this spinlock was used only for that code, it can be deleted as well.

Signed-off-by: Javier Martinez Canillas <martinez.javier@gmail.com>
Acked-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-23 14:19:33 -08:00
Javier Martinez Canillas
0089bf1fb1 Staging: xgifb: Remove all the references to XGIfb_accel
xgifb framebuffer driver has an option to use an accelerator engine that never
get used (XGIfb_accel is always 0).

An earlier patchset remove the code that depends on the accelerator being
activated. This patch removes all the references to XGIfb_accel.

Signed-off-by: Javier Martinez Canillas <martinez.javier@gmail.com>
Acked-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-23 14:19:33 -08:00
Javier Martinez Canillas
c73d0d5506 Staging: xgifb: Remove unused spinlock conditional compilation logic
xgifb staging driver for XG20, XG21, XG40, XG42 frame buffer device
has a accelerator engine that never get used (XGIfb_accel is always 0).

Also the driver has a set of defines that hides the synchronization
mechanism used to access critical sections and a way to disable spinlocks
use at compile time.

In a earlier patch all the code that depends on the accelerator being active
was deleted because it was dead code. Since the only usage of this
synchronization defines were in that dead code, this patch removes all the
now unused spinlock conditional compilation logic.

Signed-off-by: Javier Martinez Canillas <martinez.javier@gmail.com>
Acked-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-23 14:18:07 -08:00
Javier Martinez Canillas
898fcb9806 Staging: xgifb: Remove unused functions
Earlier patch removed code that never got executed because it depended on
XGIfb_accel variable value to de distinct than 0. But this variable is
always 0 in current driver.

That dead code used a set of functions that not remains unused.

This patch removes these unused functions.

Signed-off-by: Javier Martinez Canillas <martinez.javier@gmail.com>
Acked-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-23 14:18:07 -08:00
Javier Martinez Canillas
cfd6ea0b73 Staging: xgifb: Removes dead code
xgifb staging driver has code that dependens on XGIfb_accel != 0.
But as Dan Carpenter noticed, XGIfb_accel value is always 0 in current driver.
So there is code that never gets executed.

This patch removes this dead code.

Signed-off-by: Javier Martinez Canillas <martinez.javier@gmail.com>
Acked-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-23 14:18:07 -08:00
Tomas Winkler
fc3cc2caa0 staging/easycap: use USB_SUBCLASS_AUDIOSTREAMING instead of 0x02
use USB_SUBCLASS_AUDIOSTREAMING constant from usb/audio.h
instead of 0x02

Cc: Mike Thomas <rmthomas@sciolus.org>
Cc: Dan Carpenter <error27@gmail.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-23 14:15:35 -08:00
Tomas Winkler
dfcce7bf09 staging/easycap: easycap_usb_probe: more indentation cleanups
Cc: Mike Thomas <rmthomas@sciolus.org>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Reviewed-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-23 14:15:35 -08:00
Tomas Winkler
b4a5916e6b staging/easycap: revamp inputset population code
make inputset population to be more compact and readable

Cc: Mike Thomas <rmthomas@sciolus.org>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Reviewed-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-23 14:15:35 -08:00
Tomas Winkler
e03da5e2b7 staging/easycap: fix style issues in easycap_usb_probe function
fix some code styles and drop too verbose printouts
and non relevant code

Cc: Mike Thomas <rmthomas@sciolus.org>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Reviewed-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-23 14:15:34 -08:00
Greg Kroah-Hartman
ecc1058aec Revert "staging: iio: ak8975: add platform data."
This reverts commit f2f1794835.

It should not be putting code into the include/input/ directory, and
lots of other people have complained about it.

Cc: Tony SIM <chinyeow.sim.xt@renesas.com>
Cc: Andrew Chew <achew@nvidia.com>
Cc: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-23 14:12:25 -08:00
Mike McCormack
ae9f66da3d staging: rtl8192e: Remove struct member irq_mask
Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-23 14:10:10 -08:00
Mike McCormack
703fdcc398 staging: rtl8192e: Make RT_TRACE use consistent
Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-23 14:10:09 -08:00
Mike McCormack
9f17b07638 staging: rtl8192e: Make functions static
Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-23 14:10:09 -08:00
Mike McCormack
9c100d50fc staging: rtl8192e: Delete dead code
Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-23 14:10:09 -08:00
Mike McCormack
09e4f231fc staging: rtl8192e: Remove externs, redundant comments
Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-23 14:10:09 -08:00
Mike McCormack
51de57ef21 staging: rtl8192e: Remove USB related code
Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-23 14:10:09 -08:00
Mike McCormack
668c711bfd staging: rtl8192e: Remove useless usermode callback
Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-23 14:10:08 -08:00
Roland Vossen
2d57aa7bb7 staging: brcm80211: added locks in wl_mac80211.c
Increasing robustness of the code, although no problem has been reported
in the field. Several code paths were unshielded for multi thread access.
Several lock acquisitions have been added to wl_mac80211.c

Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by:   Arend van Spriel <arend@broadcom.com>
Reviewed-by:   Brett Rudley <brudley@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-23 14:08:05 -08:00
Roland Vossen
e34870f828 staging: brcm80211: removed locks around Mac80211 calls
A spinlock was acquired prior to calling the Mac80211 functions
ieee80211_wake_queues() and ieee80211_stop_queues() and Cfg80211 functions
wiphy_rfkill_set_hw_state() and wiphy_rfkill_start_polling().
This is not required and could even lead to instability. Therefore the locks
were removed.

Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by:   Arend van Spriel <arend@broadcom.com>
Reviewed-by:   Brett Rudley <brudley@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-23 14:08:05 -08:00
Roland Vossen
55182a1006 staging: brcm80211: cosmetic changes
Code cleanup. Added lock related comments to wl_mac80211.c. Also removed a
redundant function definition.

Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Reviewed-by:   Arend van Spriel <arend@broadcom.com>
Reviewed-by:   Brett Rudley <brudley@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-23 14:08:05 -08:00
Arend van Spriel
ce774bdcfe staging: brcm80211: remove some bsscfg attribute that are redundant
In the struct wlc_bsscfg a couple of attribute were held under a
preprocessor definition, but these are not needed in the mac80211
driver context.

Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-23 14:07:31 -08:00
Arend van Spriel
eff1b99a6f staging: brcm80211: allow changing channel by mac80211 when associated
When associated on 5G the driver receives a probe request for 2G with
a 2G rate specified. The driver asserts as the operating band is still
5G when the probe request packet is given. Root cause was that ioctl
function did fail upon setting the channel as requested by mac80211
when we are associated.

Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-23 14:07:30 -08:00
Stanislav Fomichev
f317154929 staging: brcm80211: remove the rest of broadcom specific byte swapping routines
- move ltoh16_buf/htol16_buf util/bcmsrom.c
- replace ltoh16_buf in brcmsmac/wlc_mac80211.c with several
  le16_to_cpu's

Signed-off-by: Stanislav Fomichev <kernel@fomichev.me>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-23 14:07:00 -08:00
Stanislav Fomichev
29750b90b5 staging: brcm80211: replace htod/dtoh broadcom defines
htod32 -> cpu_to_le32
htod16 -> cpu_to_le16
dtoh32 -> le32_to_cpu
dtoh16 -> le16_to_cpu

For brcmfmac/dhd_common.c just removed defines.

Signed-off-by: Stanislav Fomichev <kernel@fomichev.me>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-23 14:07:00 -08:00
Stanislav Fomichev
458b2e4df4 staging: brcm80211: remove unused broadcom byte swapping macroses
- BCMSWAP32
- bcmswap32
- BCMSWAP32BY16
- bcmswap32by16

Signed-off-by: Stanislav Fomichev <kernel@fomichev.me>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-23 14:07:00 -08:00
Stanislav Fomichev
56dfe3c71b staging: brcm80211: replace broadcom specific unaligned byte swapping routines
htol16_ua_store -> put_unaligned_le16
htol32_ua_store -> put_unaligned_le32
hton16_ua_store -> put_unaligned_be16
hton32_ua_store -> put_unaligned_be32
ltoh16_ua -> get_unaligned_le16
ltoh32_ua -> get_unaligned_le32
ntoh16_ua -> get_unaligned_be16
ntoh32_ua -> get_unaligned_be32

removed unused:
- load32_ua
- load16_ua
- store32_ua
- store16_ua
- ltoh_ua
- ntoh_au

Signed-off-by: Stanislav Fomichev <kernel@fomichev.me>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-23 14:06:59 -08:00
Stanislav Fomichev
628f10ba81 staging: brcm80211: replace broadcom specific byte swapping routines
HTON16/hton16 -> cpu_to_be16 (htons for networking code)
HTON32/hton32 -> cpu_to_be32 (htonl for networking code)
NTOH16/ntoh32 -> be16_to_cpu (ntohs for networking code)
NTOH32/ntoh32 -> be32_to_cpu (ntohl for networking code)
LTOH16/ltoh16 -> le16_to_cpu
LTOH32/ltoh32 -> le32_to_cpu
HTOL16/htol16 -> cpu_to_le16
HTOL32/htol32 -> cpu_to_le32

Signed-off-by: Stanislav Fomichev <kernel@fomichev.me>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-23 14:06:59 -08:00
Roland Vossen
1005f08574 staging: brcm80211: bugfix for crash on heavy transmit traffic
With heavy transmit traffic, once in a while (range 15mins-1hr)
a tx packet was added to a full transmit queue. Under certain
conditions an other packet in the queue gets bumped to make room
for the new packet. This is not considered an error condition, but
normal operation. Despite that, there was an ASSERT(0) that caused
the driver to oops. The ASSERT(0) has been removed. Driver was tested
afterwards.

Signed-off-by: Roland Vossen <rvossen@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-23 14:05:42 -08:00
Nitin Gupta
3c8bb7aab9 staging: Allow sharing xvmalloc for zram and zcache
Both zram and zcache use xvmalloc allocator. If xvmalloc
is compiled separately for both of them, we will get linker
error if they are both selected as "built-in". We can also
get linker error regarding missing xvmalloc symbols if zram
is not built.

So, we now compile xvmalloc separately and export its symbols
which are then used by both of zram and zcache.

Signed-off-by: Nitin Gupta <ngupta@vflare.org>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-23 14:02:56 -08:00
Vipin Mehta
5caf8fca2d staging: ath6kl: Eliminate cfg80211 warnings
Cancel the pending scan operation once the interface is going down to
avoid warnings from the cfg80211 module. Once the interface is down,
cfg80211 checks for any pending scan requests and dumps a warning if it
finds one. It expects the driver to abort any ongoing scan operation
once the driver detects that the interface is going down.

Signed-off-by: Vipin Mehta <vmehta@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-23 14:00:14 -08:00
Dan Carpenter
5b6567ee84 staging: ath6kl: buffer overflow in SEND_FRAME ioctl
We should check that optTxFrmCmd.optIEDataLen isn't too large before we
copy it into the data buffer.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Vipin Mehta <vipin.mehta@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-23 14:00:13 -08:00
Dan Carpenter
253804a25b staging: ath6kl: cleanup in SEND_FRAME ioctl
The original code was written in a funny way where every statement was
part of else if blocks.  I broke them up into separate statements by
adding breaks on failure conditions.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Vipin Mehta <vipin.mehta@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-23 14:00:08 -08:00
Luis R. Rodriguez
108160db3f staging: ath6kl: update TODO file / maintainers
This updates the TODO file to reflect new changes on development.

Cc: Joe Perches <joe@perches.com>
Cc: Naveen Singh <nsingh@atheros.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-23 13:59:56 -08:00
Greg Kroah-Hartman
5352161fc4 Staging: gma500: fix up trailing whitespace errors
Lots of little ones all through the driver, mostly
all in a cut-and-paste header comment.

Cc: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-23 13:50:42 -08:00
Greg Kroah-Hartman
8997fd21bb Staging: gma500: remove psb_gfx.mod.c
The mod.c file should not be part of the repo.

Cc: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-23 13:47:57 -08:00
Alan Cox
0867b42113 staging: gma500: Intel GMA500 staging driver
This is an initial staging driver for the GMA500. It's been stripped out
of the PVR drivers and crunched together from various bits of code and
different kernels.

Currently it's unaccelerated but still pretty snappy even compositing with
the frame buffer X server.

Lots of work is needed to rework the ttm and bo interfaces from being
ripped out and then 2D acceleration wants putting back for framebuffer and
somehow eventually via DRM.

There is no support for the parts without open source userspace (video
accelerators, 3D) as per kernel policy.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-23 13:37:34 -08:00
Haiyang Zhang
31acaa50c6 staging: hv: Fix the WARN_ON condition in free_net_device()
In a previous commit, 7a09876d, ASSERT was changed to WARN_ON, but
the condition wasn't updated. This patch fixed this error.

Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-23 13:22:26 -08:00
Haiyang Zhang
6fbb47859f staging: hv: Remove unnecessary ASSERTs in netvsc_initialize()
These fields have been assigned in netvsc_drv_init() before calling
netvsc_initialize(), so there is no need to check them.
The ASSERTs were already commented out, and this patch removes
them.

Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-23 13:22:26 -08:00
Uwe Kleine-König
3173a5ecd8 staging/trivial: fix typos concerning "select"
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 13:30:12 -08:00
Uwe Kleine-König
ecc73a99e4 staging/trivial: fix typos concerning "memory"
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 13:30:12 -08:00
Uwe Kleine-König
8c209fe9b0 staging/trivial: fix typos concerning "management"
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 13:30:11 -08:00
Uwe Kleine-König
d9fed669ac staging/trivial: fix typos concerning "initiali[zs]e"
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 13:30:11 -08:00
Uwe Kleine-König
f956004262 staging/trivial: fix typos concerning "implementation"
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 13:30:11 -08:00
Uwe Kleine-König
1bf8240c07 staging/trivial: fix typos concerning "function"
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 13:30:10 -08:00
Uwe Kleine-König
f0c0dda076 staging/trivial: fix typos concerning "failed"
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 13:30:10 -08:00
Uwe Kleine-König
9e36261d45 staging/trivial: fix typos concerning "consistent"
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 13:30:10 -08:00
Uwe Kleine-König
dca488b87e staging/trivial: fix typos concerning "adjust"
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 13:30:10 -08:00
Uwe Kleine-König
aec563b4f0 staging/trivial: fix typos concerning "address"
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 13:30:09 -08:00
Uwe Kleine-König
5ff6a1fd5c staging/trivial: fix typos concerning "access"
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 13:30:09 -08:00
Vipin Mehta
d0e0086893 staging: ath6kl: Fixing disappearing of scan list due to jiffies wrap over
When jiffies wrap-over, all the BSS in the cache is removed. Wrap-over of
jiffies is not handled in the correct way. This cause the scan list to go
empty during this time for a small duration

Signed-off-by: Vipin Mehta <vmehta@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 13:28:53 -08:00
Vipin Mehta
28f7e85a4b staging: ath6kl: Fixing accidental overwriting of probed ssid list in the hardware
Fixing the code to avoid overwriting of the first index in the probed ssid
list maintained by the hardware. This index is used to store broadcast SSID.

Signed-off-by: Vipin Mehta <vmehta@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 13:28:52 -08:00
Vipin Mehta
98b6d2381a staging: ath6kl: Adding state in driver to track the sme state
Adding state in driver to track the sme state. The connect/disconnect
events from the driver were messing up the state maintained within the
cfg80211 module.

Signed-off-by: Vipin Mehta <vmehta@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 13:28:52 -08:00
Vipin Mehta
9ea979d3b9 staging: ath6kl: Fixing the cached copy of the BSS filter set by user
Fixing the cached copy of the BSS filter set by user.

Signed-off-by: Vipin Mehta <vmehta@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 13:28:52 -08:00
Vipin Mehta
0ad7fdde6c staging: ath6kl: Fixing memory leak
The patch fixes a mismatch in the allocation and free of scatter HIF bus
requests in the suspend/resume path.

Signed-off-by: Vipin Mehta <vmehta@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 13:28:52 -08:00
Vipin Mehta
711a1bccf2 staging: ath6kl: Add configuration for excessive TX retry threshold
Adding host side interface to configure the excessive TX retry threshold.
It is used by the target to determine disconnection triggers. Additionally,
some definitions have been added to header file wmi.h to bridge the gap
for the newly added command.

Signed-off-by: Vipin Mehta <vmehta@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 13:28:51 -08:00
Vipin Mehta
1581595dd9 staging: ath6kl: Fixing a memory leak
Fix for a memory leak discovered during suspend/resume testing.

Signed-off-by: Vipin Mehta <vmehta@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 13:28:51 -08:00
Vipin Mehta
774c1fe2fe staging: ath6kl: Fixing a memory leak
Virtual Scatter Gather Lists not getting freed during the HTCStop(). The
patch adds some clean up code in the code path.

Signed-off-by: Vipin Mehta <vmehta@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 13:28:51 -08:00
Vipin Mehta
fb9b548717 staging: ath6kl: Adding support for txop bursting enable/disable
Adding compile time support for enabling/disabling txop bursting.

Signed-off-by: Vipin Mehta <vmehta@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 13:28:51 -08:00
Vipin Mehta
15eccc06e1 staging: ath6kl: Consolidating hardware configuration
Move all the wmi configuration commands done after wmi_ready to a single
function.

Signed-off-by: Vipin Mehta <vmehta@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 13:28:51 -08:00
Vipin Mehta
caf3fb4194 staging: ath6kl: Fixing driver initialization for manufacturing mode
Fixing the driver initialization for manufacturing mode that involves
downloading a firmware binary meant for RF tests on the factory floor.

Signed-off-by: Vipin Mehta <vmehta@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 13:28:51 -08:00
Vipin Mehta
83195cc8a8 staging: ath6kl: Fixing target crash due to mismatch connect/disconnect
Firmware design requires a WMI_DISCONNECT_CMD for every WMI_CONNECT_CMD to
clear the firmware previous profile state. There is one case in linux host
driver where two WMI_CONNECT_CMD are given without a WMI_DISCONNECT_CMD.
This causes firmware state to mismatch causing an ASSERT. Use the driver
state variable arConnectPending to track whether a WMI_CONNECT_CMD is
issued to firmware.

Signed-off-by: Vipin Mehta <vmehta@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 13:28:50 -08:00
Vipin Mehta
3f2fd78e68 staging: ath6kl: Return correct scan complete status
Return correct scan complete status to the cfg80211 module based on
the value returned from the hardware.

Signed-off-by: Vipin Mehta <vmehta@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 13:28:50 -08:00
Vipin Mehta
e8763b5fe8 staging: ath6kl: Fixing key settings for WPA/WPA2
A bug was observed during the reconnection phase in the WPA/WPA2-PSK scenario
where the EAPOL frames were going encrypted during an auto reconnection
attempt. The initial 4-way handshake would go fine but then the driver
was getting a command to set default keys sometime later. Setting of an
incorrect flag (TX_USAGE) in the hadrware was causing the EAPOL frames during
the subsequent 4-way handshake attempts to go encrypted causing the AP to
reject the station.

Signed-off-by: Vipin Mehta <vmehta@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 13:28:49 -08:00
Vipin Mehta
da101d5635 staging: ath6kl: Fixing a NULL pointer exception
The driver was dereferencing a NULL pointer because of the device instance
being registered via the set_wiphy_dev() function. The function
ar6000_avail_ev() was passing the argument as NULL instead of using the one
returned by the MMC stack through the probe callback.

Signed-off-by: Vipin Mehta <vmehta@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 13:28:49 -08:00
Jerome Marchand
6642a67c55 Staging: zram: initialize device on first read
Currently the device is initialized when first write is done to the
device. Any read attempt before the first write would fail, including
"hidden" read the user may not know about (as for example if he tries
to write a partial block).

This patch initializes the device on first request, whether read or
write.

Signed-off-by: Jerome Marchand <jmarchan@redhat.com>
Cc: Nitin Gupta <ngupta@vflare.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 13:26:12 -08:00
Vasiliy Kulikov
69648bed53 staging: zcache: fix memory leak
obj is not freed if __get_free_page() failed.

Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 13:24:53 -08:00
Jonathan Cameron
7a9f437af9 staging:iio:gyro:adis16130 stub removal and cleanup
Get rid of unused stubs for trigger and buffer support.
Fix line length issues.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 13:24:19 -08:00
Jonathan Cameron
8d016b43c9 staging:iio:gyro:adis16080 unused stub removal and cleanup
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 13:24:18 -08:00
Jonathan Cameron
d14ae859bb staging:iio:gyro:adis16060 cleanup and dead code removal
Removed stubs related to buffering and triggering. Put them back
when they are actually needed.
Fixed line length issues.
Made a number of functions static as no longer in header.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 13:24:18 -08:00
Jonathan Cameron
3faa4d3f88 staging:iio:meter remove stubs from ade7854.
General cleanup and use of standard functions to simplfy some spi reads
as well.

Also added a device id table to the spi version.

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-02-18 13:23:50 -08:00
Jonathan Cameron
3859faca5e staging:iio:meter remove stubs from ade7759.
General cleanup and use of standard functions to simplfy some spi reads
as well.

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-02-18 13:23:50 -08:00
Jonathan Cameron
5a0326d9f8 staging:iio:meter remove stubs from ade7754.
General cleanup and use of standard functions to simplfy some spi reads
as well.

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-02-18 13:23:49 -08:00
Jonathan Cameron
72db6eb674 staging:iio:meter remove stubs from ade7753.
General cleanup and use of standard functions to simplfy some spi reads
as well.

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-02-18 13:23:49 -08:00
Jonathan Cameron
96df9799a4 staging:iio: buffer example - add lots more runtime parameters
Add ability to control delay for event free buffers
Add ability to control length of buffer
Add ability to control how many read cycles occur

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Tested-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 13:22:52 -08:00
Jonathan Cameron
30268a3da9 staging:iio: update example to handle case with no ring events
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Tested-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 13:22:51 -08:00
Jonathan Cameron
b949793b2c staging:iio:lis3l02dq allow buffer implementation selection
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 13:22:51 -08:00
Jonathan Cameron
b174baf4b7 staging:iio:kfifo buffer implementation
A very simple use of a kfifo as an alternative for the ring_sw

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Tested-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 13:22:51 -08:00
Jonathan Cameron
d5857d65b5 staging:iio:buffering move the copy to user on rip down into implementations
The current interface is not as adaptable as it should be. Moving
this complexity into the implementations makes it easier to add
new implementations.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Tested-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 13:22:50 -08:00
Tony SIM
f2f1794835 staging: iio: ak8975: add platform data.
As some of the platform not support irq_to_gpio, we pass gpio port
by platform data.

Signed-off-by: Tony SIM <chinyeow.sim.xt@renesas.com>
Signed-off-by: Andrew Chew <achew@nvidia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 13:21:57 -08:00
David Brown
ea801950cf staging: msm: Use explicit GPLv2 licenses
Replace a BSD-style license in Code Aurora Forum authored files with
an explicit GPLv2.

Signed-off-by: David Brown <davidb@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 13:21:56 -08:00
Javier Martinez Canillas
78acd58746 Staging: bcm: Bcmchar: Fix some checkpatch errors
Signed-off-by: Javier Martinez Canillas <martinez.javier@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-18 13:21:56 -08:00