GitHub/exynos8895/android_kernel_samsung_universal8895.git
13 years agostaging:iio:Documentation Simple dummy driver to explain the basics
Jonathan Cameron [Fri, 14 Oct 2011 15:34:13 +0000 (16:34 +0100)]
staging:iio:Documentation Simple dummy driver to explain the basics

The documenation explaining how to go about writing a driver is lagging
horribly, so here is another approach; an actual driver with
lots of explanatory comments.

Note it is currently minimal in that there are no events and no
buffer.  With care they can probably be added in additional files
without messing up the clarity of what we have here.

V2: Addressed some of Manuel Stahl's feedback.

Fixed up kernel doc.
Added more general description.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:adc:max1363 incorrect allocation of available_scanmasks
Jonathan Cameron [Fri, 14 Oct 2011 13:46:59 +0000 (14:46 +0100)]
staging:iio:adc:max1363 incorrect allocation of available_scanmasks

Longs are not known for being 8 bits.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio: fix removal path to allow correct freeing.
Jonathan Cameron [Fri, 14 Oct 2011 13:46:58 +0000 (14:46 +0100)]
staging:iio: fix removal path to allow correct freeing.

Fix a dumb lack of consideration of the effect of combining
the iio_device_unregister and iio_free_device calls into
one.  There is no valid place to free some of the sysfs
array elements.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoiio: adc: remove ADT75 driver - hwmon/lm75 will take over ADT75 support
Michael Hennerich [Fri, 14 Oct 2011 07:00:44 +0000 (09:00 +0200)]
iio: adc: remove ADT75 driver - hwmon/lm75 will take over ADT75 support

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio: gpio build dependency fixing
Jonathan Cameron [Wed, 12 Oct 2011 09:57:33 +0000 (10:57 +0100)]
staging:iio: gpio build dependency fixing

Numerous drivers either had pointless includes of gpio.h
or should have been dependent on GENERIC_GPIO and were not.
Conversion of ads1210 to use array registration triggered
build failures that highlighted all was not well.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Reported-by: Randy Dunlap <rdunlap@xenotime.net>
Acked-by: Randy Dunlap <rdunlap@xenotime.net>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: hv: storvsc: Fix checkpatch warnings
K. Y. Srinivasan [Sat, 15 Oct 2011 04:31:57 +0000 (21:31 -0700)]
Staging: hv: storvsc: Fix checkpatch warnings

Fix checkpatch warnings.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: hv: mousevsc: Fix a checkpatch warning
K. Y. Srinivasan [Sat, 15 Oct 2011 04:31:56 +0000 (21:31 -0700)]
Staging: hv: mousevsc: Fix a checkpatch warning

Fix a checkpatch warning.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: drop unused Kconfig symbols
Paul Bolle [Fri, 14 Oct 2011 12:30:58 +0000 (14:30 +0200)]
staging: drop unused Kconfig symbols

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: zcache: remove zcache_direct_reclaim_lock
Seth Jennings [Wed, 12 Oct 2011 19:41:00 +0000 (14:41 -0500)]
staging: zcache: remove zcache_direct_reclaim_lock

zcache_do_preload() currently does a spin_trylock() on the
zcache_direct_reclaim_lock. Holding this lock intends to prevent
shrink_zcache_memory() from evicting zbud pages as a result
of a preload.

However, it also prevents two threads from
executing zcache_do_preload() at the same time.  The first
thread will obtain the lock and the second thread's spin_trylock()
will fail (an aborted preload) causing the page to be either lost
(cleancache) or pushed out to the swap device (frontswap). It
also doesn't ensure that the call to shrink_zcache_memory() is
on the same thread as the call to zcache_do_preload().

Additional, there is no need for this mechanism because all
zcache_do_preload() calls that come down from cleancache already
have PF_MEMALLOC set in the process flags which prevents
direct reclaim in the memory manager. If the zcache_do_preload()
call is done from the frontswap path, we _want_ reclaim to be
done (which it isn't right now).

This patch removes the zcache_direct_reclaim_lock and related
statistics in zcache.

Based on v3.1-rc8

Signed-off-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Reviewed-by: Dave Hansen <dave@linux.vnet.ibm.com>
Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging/nvec: fix compilation error in nvec.c
Marc Dietrich [Mon, 10 Oct 2011 09:35:45 +0000 (11:35 +0200)]
staging/nvec: fix compilation error in nvec.c

This fixes a compilation error in nvec.c due to the missing module.h include.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
Cc: Julian Andres Klode <jak@jak-linux.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging/easycap: kill timeval members of easycap struct
Tomas Winkler [Mon, 10 Oct 2011 06:36:38 +0000 (08:36 +0200)]
staging/easycap: kill timeval members of easycap struct

timeval[0-9] were not used or used in a ready only code
so we can remove them safely and so the code

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: wlags49_h2: Fixup SIOCSIWGENIE
David Kilroy [Sun, 9 Oct 2011 11:11:37 +0000 (12:11 +0100)]
staging: wlags49_h2: Fixup SIOCSIWGENIE

Setting the key management scheme is done in SIOCSIWAUTH, so
no need to do anything in SIOCSIWGENIE.

Fix up function name.

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: wlags49_h2: Fixup IW_AUTH handling
David Kilroy [Sun, 9 Oct 2011 11:11:36 +0000 (12:11 +0100)]
staging: wlags49_h2: Fixup IW_AUTH handling

Handle more cases in IW_AUTH.

Avoid reporting errors (invalid parameter) on operations that we
can't do anything with.

Return -EINPROGRESS from some operations to get wpa_supplicant to
batch and commit changes.

In other operations apply the changes immediately.

Avoid writing WEP keys from the commit handler when WEP is not
being used.

Accept WPA_VERSION_DISABLED, which is received from wpa_supplicant
during WEP.

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: wlags49_h2: Make key setting more reliable
David Kilroy [Sun, 9 Oct 2011 11:11:35 +0000 (12:11 +0100)]
staging: wlags49_h2: Make key setting more reliable

Share logic between encodeext and encode, so that we can handle
subtle differences between them (implied set_tx), and clear the
appropriate keys if you attempt to switch straight from WPA to
WEP and vice versa.

Also reinstate the TX buffer flush, and ensure the key index is
written to the card little endian.

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: wlags49_h2: Report WPA IE in scan results with IWEVGENIE
David Kilroy [Sun, 9 Oct 2011 11:11:34 +0000 (12:11 +0100)]
staging: wlags49_h2: Report WPA IE in scan results with IWEVGENIE

Report the IE using the appropriate event instead of a custom one.

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: wlags49_h2: Remove useless IWE_STREAM_ADD_XXX defines
David Kilroy [Sun, 9 Oct 2011 11:11:33 +0000 (12:11 +0100)]
staging: wlags49_h2: Remove useless IWE_STREAM_ADD_XXX defines

These macros don't map to anything different. Just remove them.

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: wlags49_h2: Enable WPA in the HCF
David Kilroy [Sun, 9 Oct 2011 11:11:32 +0000 (12:11 +0100)]
staging: wlags49_h2: Enable WPA in the HCF

WPA has been disabled in the HCF layer. The firmware does
support it (it is used on other platforms). Enable it so
we can work through the issues.

Note that we also enable this for the HERMES 2.5 non-WARP
firmware cards.

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: wlags49_h2: Handle sysfs_create_group return correctly
David Kilroy [Sun, 9 Oct 2011 11:11:31 +0000 (12:11 +0100)]
staging: wlags49_h2: Handle sysfs_create_group return correctly

The function returns 0 on success and non-zero on error. So
correctly record the status so it is freed appropriately.

Signed-off-by: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agodrivers: staging: rts_pstor fixed checkpatch warnings
Pelle Windestam [Mon, 10 Oct 2011 17:41:42 +0000 (19:41 +0200)]
drivers: staging: rts_pstor fixed checkpatch warnings

Fixed the checkpatch warnings in rtsx.c/.h, mostly braces and spaces
before tabs issues. Also fixed warning about not using
DEFINE_PCI_DEVICE_TABLE(...) macro.

Signed-off-by: Pelle Windestam <pelle@windestam.se>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:rts_pstor:Fix SDIO issue
wwang [Mon, 10 Oct 2011 06:47:08 +0000 (14:47 +0800)]
staging:rts_pstor:Fix SDIO issue

Fix a bug that SDIO and SD normal card would appear simultaneously if a SDIO card inserted.

Signed-off-by: wwang <wei_wang@realsil.com.cn>
Acked-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: comedi: fix brace coding style issue in ni_atmio.c
Jake Burton [Mon, 10 Oct 2011 16:02:24 +0000 (17:02 +0100)]
Staging: comedi: fix brace coding style issue in ni_atmio.c

This is a patch to the ni_atmio.c file which fixes a brace and whitespace warning found by the checkpatch.pl tool

Signed-off-by: Jake Burton <jake5991@live.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: comedi: c6xdigio: fixed missing KERN_* in printk
Nasir Abed [Mon, 10 Oct 2011 10:09:52 +0000 (12:09 +0200)]
Staging: comedi: c6xdigio: fixed missing KERN_* in printk

Fixed missing KERN_* in printk statements.

Signed-off-by: Nasir Abed <nasirabed+kernel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: xgifb: clean up 2nd display state
Aaro Koskinen [Tue, 11 Oct 2011 18:47:37 +0000 (21:47 +0300)]
staging: xgifb: clean up 2nd display state

Convert the display type to enum and rename disp_state to display2.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: xgifb: delete CRT1 state
Aaro Koskinen [Tue, 11 Oct 2011 18:47:36 +0000 (21:47 +0300)]
staging: xgifb: delete CRT1 state

The driver does not need to manage CRT1 state.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: xgifb: make DAC tables const
Aaro Koskinen [Tue, 11 Oct 2011 18:47:35 +0000 (21:47 +0300)]
staging: xgifb: make DAC tables const

DAC tables are read-only and can be made const.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: xgifb: make RAM type tables const
Aaro Koskinen [Tue, 11 Oct 2011 18:47:34 +0000 (21:47 +0300)]
staging: xgifb: make RAM type tables const

RAM type tables are read-only and can be made const.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: xgifb: move XGINew_DataBusWidth into vb_device_info
Aaro Koskinen [Tue, 11 Oct 2011 18:47:33 +0000 (21:47 +0300)]
staging: xgifb: move XGINew_DataBusWidth into vb_device_info

Move the memory bus width info to vb_device_info.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: xgifb: move XGINew_ChannelAB into vb_device_info
Aaro Koskinen [Tue, 11 Oct 2011 18:47:32 +0000 (21:47 +0300)]
staging: xgifb: move XGINew_ChannelAB into vb_device_info

Move the memory channel info into vb_device_info.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: xgifb: move XGINew_RAMType into vb_device_info
Aaro Koskinen [Tue, 11 Oct 2011 18:47:31 +0000 (21:47 +0300)]
staging: xgifb: move XGINew_RAMType into vb_device_info

The RAM type is device specific, so move it into vb_device_info.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: xgifb: eliminate global XGI_Pr data
Aaro Koskinen [Tue, 11 Oct 2011 18:47:30 +0000 (21:47 +0300)]
staging: xgifb: eliminate global XGI_Pr data

Move vb_device_info into xgifb_video_info.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: xgifb: make XGIbios_mode const
Aaro Koskinen [Tue, 11 Oct 2011 18:47:29 +0000 (21:47 +0300)]
staging: xgifb: make XGIbios_mode const

Comments are wrong, the table is read-only and can be made const.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: xgifb: eliminate filter_tb global variable
Aaro Koskinen [Tue, 11 Oct 2011 18:47:28 +0000 (21:47 +0300)]
staging: xgifb: eliminate filter_tb global variable

filter_tb is only used inside a single function, and it does not need
to be static.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: xgifb: eliminate XGIfb_fix
Aaro Koskinen [Tue, 11 Oct 2011 18:47:27 +0000 (21:47 +0300)]
staging: xgifb: eliminate XGIfb_fix

Eliminate XGIfb_fix and initialize needed fields of fb_info->fix
in probe().

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: xgifb: eliminate default_var
Aaro Koskinen [Tue, 11 Oct 2011 18:47:26 +0000 (21:47 +0300)]
staging: xgifb: eliminate default_var

Eliminate default_var and initialize needed fields of fb_info->var
in probe().

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: xgifb: eliminate XGIfb_CRT2_write_enable variable
Aaro Koskinen [Tue, 11 Oct 2011 18:47:25 +0000 (21:47 +0300)]
staging: xgifb: eliminate XGIfb_CRT2_write_enable variable

Replace XGIfb_CRT2_write_enable with IND_XGI_CRT2_WRITE_ENABLE_315.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: xgifb: move pseudo_palette into xgifb_video_info
Aaro Koskinen [Tue, 11 Oct 2011 18:47:24 +0000 (21:47 +0300)]
staging: xgifb: move pseudo_palette into xgifb_video_info

pseudo_palette should be dynamically allocated for each fb.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: xgifb: move XGIfb_rate_idx into xgifb_video_info
Aaro Koskinen [Tue, 11 Oct 2011 18:47:23 +0000 (21:47 +0300)]
staging: xgifb: move XGIfb_rate_idx into xgifb_video_info

The current refresh rate index should be stored in the device-specific
data allocated in probe().

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: xgifb: move xgifb_mode_idx into xgifb_video_info
Aaro Koskinen [Tue, 11 Oct 2011 18:47:22 +0000 (21:47 +0300)]
staging: xgifb: move xgifb_mode_idx into xgifb_video_info

The current mode index should be stored in the device-specific data
allocated in probe().

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: xgifb: eliminate XGIfb_mode_no
Aaro Koskinen [Tue, 11 Oct 2011 18:47:21 +0000 (21:47 +0300)]
staging: xgifb: eliminate XGIfb_mode_no

We can get the information from the table with mode index.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: xgifb: dynamically allocate xgifb_video_info
Aaro Koskinen [Tue, 11 Oct 2011 18:47:20 +0000 (21:47 +0300)]
staging: xgifb: dynamically allocate xgifb_video_info

Delete global xgi_video_info and dynamically allocate the data.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: xgifb: avoid direct references xgi_video_info
Aaro Koskinen [Tue, 11 Oct 2011 18:47:19 +0000 (21:47 +0300)]
staging: xgifb: avoid direct references xgi_video_info

Avoid direct references to global xgi_video_info. This will help changing
the data from statically allocated to dynamically allocated.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: xgifb: rename struct video_info to xgifb_video_info
Aaro Koskinen [Tue, 11 Oct 2011 18:47:18 +0000 (21:47 +0300)]
staging: xgifb: rename struct video_info to xgifb_video_info

Rename struct video_info to xgifb_video_info.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: xgifb: add a global variable for the default refresh rate
Aaro Koskinen [Tue, 11 Oct 2011 18:47:17 +0000 (21:47 +0300)]
staging: xgifb: add a global variable for the default refresh rate

Add a global variable for the default refresh rate. This is done to
get rid of references to xgi_video_info before the probe routine, which
should allocate the xgi_video_info dynamically in the future.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: xgifb: inline XGIfb_query_VGA_config_space()
Aaro Koskinen [Tue, 11 Oct 2011 18:47:16 +0000 (21:47 +0300)]
staging: xgifb: inline XGIfb_query_VGA_config_space()

XGIfb_query_VGA_config_space() is used only once during the init and
can be replaced with a single PCI configuration space read.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: xgifb: eliminate global XGIhw_ext data
Aaro Koskinen [Tue, 11 Oct 2011 18:47:15 +0000 (21:47 +0300)]
staging: xgifb: eliminate global XGIhw_ext data

Move xgi_hw_device_info into xgi_video_info.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: xgifb: eliminate global fb_info variable
Aaro Koskinen [Tue, 11 Oct 2011 18:47:14 +0000 (21:47 +0300)]
staging: xgifb: eliminate global fb_info variable

Move fb_info into xgi_video_info.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: xgifb: use PCI drvdata
Aaro Koskinen [Tue, 11 Oct 2011 18:47:13 +0000 (21:47 +0300)]
staging: xgifb: use PCI drvdata

Don't access the global xgi_video_info directly in xgifb_remove().

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: zcache: reduce tmem bucket lock contention
Seth Jennings [Tue, 4 Oct 2011 13:21:32 +0000 (08:21 -0500)]
staging: zcache: reduce tmem bucket lock contention

tmem uses hash buckets each with their own rbtree and lock to
quickly lookup tmem objects.  tmem has TMEM_HASH_BUCKETS (256)
buckets per pool.  However, because of the way the tmem_oid is
generated for frontswap pages, only 16 unique tmem_oids are being
generated, resulting in only 16 of the 256 buckets being used.
This cause high lock contention for the per bucket locks.

This patch changes SWIZ_BITS to include more bits of the offset.
The result is that all 256 hash buckets are potentially used resulting in a
95% drop in hash bucket lock contention.

Signed-off-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: brcm80211: remove brcm80211 driver from the staging tree
Arend van Spriel [Fri, 7 Oct 2011 14:24:40 +0000 (16:24 +0200)]
staging: brcm80211: remove brcm80211 driver from the staging tree

With the mainline patch being applied to the wireless-next repository
by John Linville this driver is no longer needed under the staging
directory. This patch ends its life under the staging tree.

Cc: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: bcm: Fix coding style issues in InterfaceMisc.c
Kevin McKinney [Tue, 11 Oct 2011 01:01:50 +0000 (21:01 -0400)]
Staging: bcm: Fix coding style issues in InterfaceMisc.c

This patch cleans up several code style issues found
in InterfaceMisc.c reported by checkpatch.pl.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: bcm: Remove assignment from if conditions reported by checkpatch.pl
Kevin McKinney [Tue, 11 Oct 2011 01:01:49 +0000 (21:01 -0400)]
Staging: bcm: Remove assignment from if conditions reported by checkpatch.pl

This patch removes an assignment from three if
conditions.  In all three cases, the line of code was
attempting to allocate memory, and check
if the memory was allocated in the if statement.
This issue was reported by checkpatch.pl.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: bcm: Fix coding style issues reported by checkpatch.pl
Kevin McKinney [Tue, 11 Oct 2011 01:01:48 +0000 (21:01 -0400)]
Staging: bcm: Fix coding style issues reported by checkpatch.pl

This patch cleans up several code style issues found
in InterfaceInit.c reported by checkpatch.pl.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: bcm: Fix assignment issue in if statement reported by checkpatch.pl.
Kevin McKinney [Fri, 7 Oct 2011 22:50:12 +0000 (18:50 -0400)]
Staging: bcm: Fix assignment issue in if statement reported by checkpatch.pl.

This patch fixes an error where an assignment "="
was being used in an if statement to determine if
Firmware was downloaded. This patch removes that
assignment, and places it above the if statement.
The if statement then evaluates the status to
verify if "0" successful, or != 0 failure.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: bcm: Remove assignment in if condition reported by checkpatch.pl
Kevin McKinney [Fri, 7 Oct 2011 22:50:11 +0000 (18:50 -0400)]
Staging: bcm: Remove assignment in if condition reported by checkpatch.pl

There is a case where an assignment was being done
in an if condition. This patch removes the assignment
from the if condition and places the assignment above
the if statement; thereby improving the readability of
the code.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: bcm: Replace dated variable __FUNCTION__ reported by checkpatch.pl
Kevin McKinney [Fri, 7 Oct 2011 22:50:10 +0000 (18:50 -0400)]
Staging: bcm: Replace dated variable __FUNCTION__ reported by checkpatch.pl

This patch replaces the obsolete variable, __FUNCTION__, that
holds the name of the current function with variable, __func__.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: bcm: Fix coding style issues reported by checkpatch.pl
Kevin McKinney [Fri, 7 Oct 2011 22:50:09 +0000 (18:50 -0400)]
Staging: bcm: Fix coding style issues reported by checkpatch.pl

This patch cleans up several hundred code style issues found
in Misc.c reported by checkpatch.pl.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: et131x: Update TODO list
Mark Einon [Mon, 10 Oct 2011 15:22:32 +0000 (16:22 +0100)]
staging: et131x: Update TODO list

Added some more tasks to the TODO list, as highlighted by Francois
Romieu <romieu@fr.zoreil.com>.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: et131x: Remove unused mac defines
Mark Einon [Mon, 10 Oct 2011 15:22:09 +0000 (16:22 +0100)]
staging: et131x: Remove unused mac defines

Remove some unused defines from et1310_mac.c.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: et131x: Fix et131x smatch issues
Mark Einon [Mon, 10 Oct 2011 15:21:12 +0000 (16:21 +0100)]
staging: et131x: Fix et131x smatch issues

This fixes the following issues:

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

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: et131x: Fix et131x sparse warnings
Mark Einon [Mon, 10 Oct 2011 15:21:11 +0000 (16:21 +0100)]
staging: et131x: Fix et131x sparse warnings

This fixes the following warnings:

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

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: et131x: Remove file et131x_version.h
Mark Einon [Fri, 7 Oct 2011 21:53:56 +0000 (22:53 +0100)]
staging: et131x: Remove file et131x_version.h

Removed defines in et131x_version.h and replaced them by actual
strings where convinient, or moved them to et131x.h

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: et131x: Move pm calls from pci device to driver device
Mark Einon [Fri, 7 Oct 2011 21:52:51 +0000 (22:52 +0100)]
staging: et131x: Move pm calls from pci device to driver device

Move the pci driver suspend/resume calls up to the driver.pm ops
structure, as they are not pci device specific.

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

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: et131x: Remove error path from suspend/resume code
Mark Einon [Fri, 7 Oct 2011 21:52:50 +0000 (22:52 +0100)]
staging: et131x: Remove error path from suspend/resume code

Removing an error path from et131x suspend/resume functions.

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

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

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: et131x: Removing Olaf Hartmann's email as it bounces
Mark Einon [Fri, 7 Oct 2011 21:51:27 +0000 (22:51 +0100)]
staging: et131x: Removing Olaf Hartmann's email as it bounces

On 3 October 2011 18:51, Uwe Ranft <uwe.ranft@telozo.com> wrote:
> Hello,
> olaf is not more longer owner of this e-mailadress. he has left our
> company.
> Please remove olaf fron the mailing list!
> Best Regards
> Uwe

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: r8712u: Fix possible out-of-bounds index with TKIP and AES keys
Larry Finger [Sat, 8 Oct 2011 19:01:06 +0000 (14:01 -0500)]
staging: r8712u: Fix possible out-of-bounds index with TKIP and AES keys

Array XGrpKey has only 2 elements and uses (keyid - 1) as the index, which
allows the possibility of memory corruption from an out-of-bounds index.

This problem was reported by a new version of smatch.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: zcache: fix crash on cpu remove
Seth Jennings [Thu, 6 Oct 2011 19:28:26 +0000 (14:28 -0500)]
staging: zcache: fix crash on cpu remove

In the case that a cpu is taken offline before zcache_do_preload() is
ever called on the cpu, the per-cpu zcache_preloads structure will
be uninitialized.  In the CPU_DEAD case for zcache_cpu_notifier(),
kp->obj is not checked before calling kmem_cache_free() on it.
If it is NULL, a crash results.

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

Signed-off-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Acked-by: Dave Hansen <dave@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: dt3155v4l: silence a compiler warning
Dan Carpenter [Thu, 6 Oct 2011 06:17:38 +0000 (09:17 +0300)]
Staging: dt3155v4l: silence a compiler warning

The '!' is dead code that was left over from a previous version.
It causes a compiler warning:
drivers/staging/dt3155v4l/dt3155v4l.c:335:3: warning: value computed
is not used

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoeasycap: fix ntsc module parameter description
Thomas Petazzoni [Thu, 6 Oct 2011 12:04:14 +0000 (14:04 +0200)]
easycap: fix ntsc module parameter description

Cc: Mike Thomas <rmthomas@sciolus.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:dac:ad5638: Fix channel address
Lars-Peter Clausen [Fri, 7 Oct 2011 08:31:42 +0000 (10:31 +0200)]
staging:iio:dac:ad5638: Fix channel address

Commit c6fc806247 ("staging:iio: ABI rework - add in_ or out_ prefix to
channnels") added the AD5868_CHANNEL macro to simplify channel initialization.
Unfortunately the macro hardcodes the channel's address to AD5686_ADDR_DAC0. As
a result writing to any of the channels will change the value of the first
channel.

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

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:dac/dds/impedance dev_info to indio_dev for consistency
Jonathan Cameron [Thu, 6 Oct 2011 16:14:38 +0000 (17:14 +0100)]
staging:iio:dac/dds/impedance dev_info to indio_dev for consistency

We had a random missmatch of these two.  Lets pick the most common
and get rid of the other.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
For adxxxx parts
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:adc:naming: dev_info to indio_dev for consistency
Jonathan Cameron [Thu, 6 Oct 2011 16:14:37 +0000 (17:14 +0100)]
staging:iio:adc:naming: dev_info to indio_dev for consistency

We had a random missmatch of these two.  Lets pick the most common
and get rid of the other.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:accel:sca3000 dev_info to indio_dev renaming.
Jonathan Cameron [Thu, 6 Oct 2011 16:14:36 +0000 (17:14 +0100)]
staging:iio:accel:sca3000 dev_info to indio_dev renaming.

Again, there is a mix of the two names for the struct iio_dev.
Lets pick one and run with it.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:core:naming: dev_info to indio_dev for consistency
Jonathan Cameron [Thu, 6 Oct 2011 16:14:35 +0000 (17:14 +0100)]
staging:iio:core:naming: dev_info to indio_dev for consistency

We had a random missmatch of these two.  Lets pick the most common
and get rid of the other.  This patch covers the core.  Others
will clean up the drivers.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: iio/adc/ad7150: release lock on error
Dan Carpenter [Thu, 6 Oct 2011 06:17:00 +0000 (09:17 +0300)]
Staging: iio/adc/ad7150: release lock on error

The error_ret label should have been before the mutex_unlock().  It's
a typo.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: iio/light/tsl2563: fix compile warning
Dan Carpenter [Thu, 6 Oct 2011 06:15:36 +0000 (09:15 +0300)]
Staging: iio/light/tsl2563: fix compile warning

This fixes a compile warning:
drivers/staging/iio/light/tsl2563.c:696:2:
warning: initialization from incompatible pointer type [enabled by default]
drivers/staging/iio/light/tsl2563.c:696:2:
warning: (near initialization for ‘tsl2563_info.write_event_value’) [enabled by default]

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

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: iio/light/tsl2563: unlock on an error path
Dan Carpenter [Thu, 6 Oct 2011 06:15:03 +0000 (09:15 +0300)]
Staging: iio/light/tsl2563: unlock on an error path

We need to unlock here before returning.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agohv: remove struct hv_device_info from hyperv.h
Greg Kroah-Hartman [Tue, 11 Oct 2011 15:43:14 +0000 (09:43 -0600)]
hv: remove struct hv_device_info from hyperv.h

This is only used/needed by the vmbus core code, so move it out of the
hyperv.h file and into the .c file that uses it.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agohv: remove free_channel() from hyperv.h
Greg Kroah-Hartman [Tue, 11 Oct 2011 15:40:01 +0000 (09:40 -0600)]
hv: remove free_channel() from hyperv.h

This function is only used in the file it is declared in
(channel_mgmt.c) so make it static and remove it from the hyperv.h file.

Cc: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agohv: hyperv.h: remove unneeded forward declarations of structures
Greg Kroah-Hartman [Tue, 11 Oct 2011 15:37:27 +0000 (09:37 -0600)]
hv: hyperv.h: remove unneeded forward declarations of structures

This file was created by mushing different .h files together and it
shows.  This change removes some unneeded forward declarations.

Cc: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agohv: hyperv.h: remove unused module macros
Greg Kroah-Hartman [Tue, 11 Oct 2011 15:33:29 +0000 (09:33 -0600)]
hv: hyperv.h: remove unused module macros

I have no idea what these were ever for, but they aren't used, so delete
them.

Cc: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agohv: remove unused LOWORD and HIWORD macros from hyperv.h
Greg Kroah-Hartman [Tue, 11 Oct 2011 15:30:22 +0000 (09:30 -0600)]
hv: remove unused LOWORD and HIWORD macros from hyperv.h

They aren't used anywhere anymore now that the debugging macros are
gone, so remove it from hyperv.h as well.

Cc: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: hv: remove vmbus_loglevel as it is not used at all anymore
Greg Kroah-Hartman [Tue, 11 Oct 2011 15:27:48 +0000 (09:27 -0600)]
Staging: hv: remove vmbus_loglevel as it is not used at all anymore

As there is no user of this variable, it's time to delete it.  For
dynamic debugging of the hyperv code, use the standard dynamic debug
kernel interface.

Cc: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: hv: remove last user of DPRINT() macro
Greg Kroah-Hartman [Tue, 11 Oct 2011 15:25:14 +0000 (09:25 -0600)]
Staging: hv: remove last user of DPRINT() macro

This also removed the unused function hv_dump_ring_info().

Cc: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: hv: storvsc: remove last usage of DPRINT_WARN
Greg Kroah-Hartman [Tue, 11 Oct 2011 15:20:31 +0000 (09:20 -0600)]
Staging: hv: storvsc: remove last usage of DPRINT_WARN

Used the correct dev_warn() call instead.

Cc: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agohv: remove a bunch of unused debug macros from hyperv.h
Greg Kroah-Hartman [Tue, 11 Oct 2011 14:47:32 +0000 (08:47 -0600)]
hv: remove a bunch of unused debug macros from hyperv.h

These aren't used by anyone anymore, so remove them before someone tries
to use them again.

Cc: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agohv: rename prep_negotiate_resp() to vmbus_prep_negotiate_resp()
Greg Kroah-Hartman [Tue, 11 Oct 2011 14:42:28 +0000 (08:42 -0600)]
hv: rename prep_negotiate_resp() to vmbus_prep_negotiate_resp()

It's a global symbol, so properly prefix it and use the proper EXPORT
value as well.

Cc: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: hv: remove unneeded asm include file in hyperv.h
Greg Kroah-Hartman [Tue, 11 Oct 2011 14:36:44 +0000 (08:36 -0600)]
Staging: hv: remove unneeded asm include file in hyperv.h

No one outside of the hyperv core needs to include the asm/hyperv.h
file, so don't put it in the "global" include/linux/hyperv.h file.

Cc: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: hv: move hyperv code out of staging directory
Greg Kroah-Hartman [Tue, 4 Oct 2011 19:29:52 +0000 (12:29 -0700)]
Staging: hv: move hyperv code out of staging directory

After many years wandering the desert, it is finally time for the
Microsoft HyperV code to move out of the staging directory.  Or at least
the core hyperv bus code, and the utility driver, the rest still have
some review to get through by the various subsystem maintainers.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
13 years agoStaging: hv: netvsc: Fix a dereferencing issue
K. Y. Srinivasan [Thu, 6 Oct 2011 17:10:56 +0000 (10:10 -0700)]
Staging: hv: netvsc: Fix a dereferencing issue

net_dev is being de-referenced without proper checking; fix it.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: hv: storvsc: ignore SET_WINDOW scsi command
Olaf Hering [Mon, 10 Oct 2011 07:37:39 +0000 (09:37 +0200)]
staging: hv: storvsc: ignore SET_WINDOW scsi command

Some commands sent by smartd will offline the device.
With this change applied, smartd sill not monitor the device anymore.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: hv: util: Invoke cn_netlink_send() in a work context
K. Y. Srinivasan [Mon, 10 Oct 2011 02:42:28 +0000 (19:42 -0700)]
Staging: hv: util: Invoke cn_netlink_send() in a work context

Invoke cn_netlink_send() in a work context as opposed being called
in the context of  channel callback. On entry into the channel callback
code the channel inbound spin lock is held and deferring to a work
context avoids having to invoke cn_netlink_send() while holding
the inbound lock. As part of this adjustment, also increase the
timeout value for waiting for the user level component of KVP.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: hv: util: Fix a bug in kvp implementation
K. Y. Srinivasan [Tue, 4 Oct 2011 21:00:02 +0000 (14:00 -0700)]
Staging: hv: util: Fix a bug in kvp implementation

The host gurantees that there can be only one kvp transaction active
against the guest. So, the transaction active state is needed only to
protect against spurious user level calls. The current code had a race
condition where the guest could prematurely return because the previous
transaction state was not cleared - this state was being cleared after
sending the response to the host and there was a window where the host
could notify the guest of a new transaction before the transaction active
state was properly set.
Also deal with the case when the user mode component
does not respond in a timely fashion correctly.
I would like to thank Long Li <longli@microsoft.com>
for identifying the problem.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Diagnosed-by: Long Li <longli@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:resolver:ad2s1210 cleanup gpio handling.
Jonathan Cameron [Wed, 5 Oct 2011 14:28:06 +0000 (15:28 +0100)]
staging:iio:resolver:ad2s1210 cleanup gpio handling.

Basically make use of the gpio array functions.
Technically the free doesn't need as much info
as given here, but this keeps it clean and easy
to follow.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:resolver:ad2s1210 drop raw config register access
Jonathan Cameron [Wed, 5 Oct 2011 14:28:05 +0000 (15:28 +0100)]
staging:iio:resolver:ad2s1210 drop raw config register access

This should never have been exposed to userspace

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:resolver:ad2s1210 minimal chan spec conversion.
Jonathan Cameron [Wed, 5 Oct 2011 14:28:04 +0000 (15:28 +0100)]
staging:iio:resolver:ad2s1210 minimal chan spec conversion.

Just convert the raw reads in this patch.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:resolver:ad2s1210 ensure iio_dev->name is set
Jonathan Cameron [Wed, 5 Oct 2011 14:28:03 +0000 (15:28 +0100)]
staging:iio:resolver:ad2s1210 ensure iio_dev->name is set

This is needed to ensure the required name attribute is
created. Using an id table is the route most consistent
with other drivers.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:resolver rename ad2s120x ->ad2s1200
Jonathan Cameron [Wed, 5 Oct 2011 14:28:02 +0000 (15:28 +0100)]
staging:iio:resolver rename ad2s120x ->ad2s1200

There are far too many possible part numbers that are
not covered in here to have such a generic name.
So move to naming after one of the supported parts.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:resolver:ad2s120x chan spec conversion
Jonathan Cameron [Wed, 5 Oct 2011 14:28:01 +0000 (15:28 +0100)]
staging:iio:resolver:ad2s120x chan spec conversion

Straight forward conversion.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:Documentation gyro -> anglvel updates in attribute names
Jonathan Cameron [Wed, 5 Oct 2011 14:28:00 +0000 (15:28 +0100)]
staging:iio:Documentation gyro -> anglvel updates in attribute names

Follows directly from change made in previous patch.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio: rename gyro channels to anglvel
Jonathan Cameron [Wed, 5 Oct 2011 14:27:59 +0000 (15:27 +0100)]
staging:iio: rename gyro channels to anglvel

Ensure naming reflects what is measured, not how it is done.
Resolvers can measure the same thing for starters.
IIO_GYRO->IIO_ANGL_VEL to ensure consistent naming.

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