Commit Graph

9755 Commits

Author SHA1 Message Date
Jonathan Cameron c009f7e426 staging:iio:buffering cleanup ring_buffer_register_ex naming.
Now the old method is long gone, lets get rid of the _ex and whilst
here remove the unused id parameter.

Trivial mechanical change, but will break any out of tree drivers
using this.

V2: rebase
V3: rebase

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-06 16:00:28 -07:00
Jonathan Cameron 6446e9cd2c staging:iio:buffering drag some stray docs back to correct place.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-06 16:00:27 -07:00
Jonathan Cameron 1a25e5928e staging:iio: struct iio_dev formatting cleanup and documentation fixes.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-06 16:00:27 -07:00
Jonathan Cameron 1e8dfcc6c3 staging:iio:trivial add a string array for IIO_RAW and IIO_PROCESSED.
Introduce IIO_RAW and IIO_PROCESSED and an array for their strings.
Also move one function to just above where it is called.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-06 16:00:27 -07:00
Michael Hennerich cecfb931c8 staging:iio: fix typo
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-06 16:00:26 -07:00
Jonathan Cameron 36b6f4a7b6 staging:iio: remove orphaned function definition.
I have no idea what this was, or what it did, but it doesn't
do it any more.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-06 16:00:26 -07:00
Jonathan Cameron 9019309c2f staging:iio: remove defunct iio_put and iio_get.
All iio dependent modules statically depend on industrialio
so these aren't needed. Not sure why they originally existed,
but they aren't now.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-06 16:00:25 -07:00
Jonathan Cameron 47c24fdd42 staging:iio: use ida_simple_get and ida_simple_remove + merge ids
Use new simple ida allocation functions to remove some boilerplate
code.

Also, now we only have one chdev per device we don't need to maintain
a separate ida for minor numbers. Just use the devices id.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-06 16:00:25 -07:00
Jonathan Cameron 5aa9618896 staging:iio: remove broken support for multiple event interfaces.
We don't have a use case for these.  Two drivers appeared to use them
but both report all events on the first.

V2: Remove now irrelevant comment.
V3: Include fixup for adc/ad7280a.c

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-09-06 16:00:25 -07:00
Jonathan Cameron b3874069f8 staging: iio: Documentation sysfs-bus-iio update for chrdev merge.
A few element in here have been wrong for some time so cleaned them
up whilst here.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-06 15:59:11 -07:00
Jonathan Cameron f625cb97d4 staging: iio: remove now defunct header definitions and add some statics
Now we have combined all chrdevs into one, some bits and bobs are only
needed in industrialio-core.c and don't need to be in the core header.

Also remove some unused defines.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-06 15:59:10 -07:00
Jonathan Cameron 1aa0427832 staging: iio: push the main buffer chrdev down to the top level.
Sorry all, this one is very invasive, though the driver changes are
just trivial interface fixes. Not all done yet.

V2 - bring the sca3000 with us.
V3 - fix ade7758 bugs in conversion.
V4 - add ad5933

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-09-06 15:59:10 -07:00
Jonathan Cameron 6356463cf4 staging: iio: squash chrdev handler remains into users.
This no longer has any purpose given all chrdevs are pretty much the same
now the event interfaces are done via anon fds

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-06 15:59:10 -07:00
Jonathan Cameron 8e7d967244 staging: iio: remove specific chrdev for event reading. Get fd from ioctl on buffer.
Change suggested by Arnd Bergmann.

No real reason to have two chrdevs per device. This step merges them into one.
Currently this means that events will only work on devices with buffers. THat will
be remedied shortly.

V2: set name for event attribute groups.  Otherwise they all sorts of fun occurs on
dynamic channel event attribute creation.

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-09-06 15:59:09 -07:00
Jonathan Cameron 7ae8cf6275 staging: iio: chrdev.h rationalization.
Push some functions out of header and include this where it is needed
in other headers only.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-06 15:59:09 -07:00
Jonathan Cameron a710cc77db staging: iio: kfifo buffer - push structure definition down into implementation.
Nothing other than the implementation needs to know about this.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-06 15:59:09 -07:00
Olaf Hering fd776ba9ab Staging: hv: vmbus: Show the modalias in /sys/bus/vmbus/devices/*/
Show a modalias file in /sys/bus/vmbus/devices/*/
Add a helper function to print the same content in modalias and uevent.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Acked-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-06 12:06:34 -07:00
K. Y. Srinivasan b2451a4907 Staging: hv: Update TODO file
Based on input from Greg, update the TODO file.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-06 12:06:33 -07:00
Haiyang Zhang 8bff33ab41 staging: hv: fix some typos in netvsc.c
Reported-by: Joe Perches <joe@perches.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-06 11:56:19 -07:00
Haiyang Zhang 669c1fc616 staging: hv: fix the page buffer when rndis data go across page boundary
In rndis_filter_receive_data(), we need to drop the 0th page and move the
rest of pages forward if the rndis data go across page boundary, otherwise
the page offset will overflow.

Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-06 11:56:19 -07:00
Haiyang Zhang bf769375c9 staging: hv: fix the return status of netvsc_start_xmit()
Fix the return status, so the upper layer will retry if transmission
fails.

Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-06 11:56:19 -07:00
Haiyang Zhang 8a5f9edc4d staging: hv: fix counting of available buffer slots when send fails
Because the number of available buffer slots doesn't decrease for failed
sends, we should not call netvsc_xmit_completion(), which increase the
count of available slots. In this failed case, just free the memory is
enough.

Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-06 11:56:19 -07:00
Haiyang Zhang 7db1d946c4 staging: hv: fix counting of #outstanding-sends in failed sends
If the packet failed to be sent, we shouldn't count it as the
number of outstanding sends.

Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-06 11:56:18 -07:00
Haiyang Zhang 692e084e77 staging: hv: re-order the code in netvsc_probe()
Re-order the code in netvsc_probe() to prevent a guest crash caused by
packets possibly received from NetVSP before call to register_netdev().

Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-06 11:56:18 -07:00
Haiyang Zhang c4b6a2eaf1 staging: hv: fix a kernel warning in netvsc_linkstatus_callback()
netif_notify_peers() caused a kernel warning in netvsc_linkstatus_callback(),
because netvsc_linkstatus_callback() is within IRQ context. So we move
the first call to netif_notify_peers() into queued work as well, but with
zero delay.

In addition to "staging-next", this should also be back-ported to stable
kernels 2.6.32 and later.

Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-06 11:56:18 -07:00
Haiyang Zhang d987115871 staging: hv: convert dev_<loglevel> to netdev_<loglevel> in netvsc
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-06 11:56:17 -07:00
Haiyang Zhang c909ebbd0d staging: hv: add newline to log messages in netvsc
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-06 11:56:17 -07:00
Haiyang Zhang a3e8095886 staging: hv: remove unnecessary includes in netvsc
hyperv.h is included by hyperv_net.h already, so no need to include it
again in these C files.

Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-06 11:56:17 -07:00
K. Y. Srinivasan 24326039b9 Staging: hv: vmbus: Cleanup the code in process_chn_event()
A channel in Hyper-V is equivalent to a device. Thus, a channel is
persistent once it is presented to the guest, even if the driver
managing this device is unloaded. By checking and invoking the driver
specific callback function under the protection of the channel
inbound_lock, we can properly deal with racing driver unloads since an
unloading driver sets the callback to NULL under the protection of this
inbound_lock.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-06 11:53:51 -07:00
K. Y. Srinivasan 7341d908af Staging: hv: vmbus: Check for events before messages
The Windows team has informed us that on Windows guests on Hyper-V,
they check for events before messages. They also recommended that we do
the same. This patch addresses this.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-06 11:53:51 -07:00
K. Y. Srinivasan 8b9987e905 Staging: hv: vmbus: Fix a bug in error handling in vmbus_bus_init()
Fix a bug in error handling in vmbus_bus_init().

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-06 11:53:51 -07:00
K. Y. Srinivasan d531babe82 Staging: hv: util: Deal with driver register failures
Properly deal with vmbus_driver_register() failures.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-06 11:53:50 -07:00
Alexey Khoroshilov 06b3f44a97 staging: lirc_sasem: fix NULL pointer dereference in sasem_probe
If any memory allocation failed, goto alloc_status_switch
leads to mutex_unlock(&context->ctx_lock) while context is NULL.
The patch moves alloc_status_switch to handle error conditions
in correct way.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-06 11:46:21 -07:00
Alexey Khoroshilov 6699291f89 staging: lirc: fix mismatch in mutex lock-unlock in imon_probe
If kzalloc failed for allocation of context, goto alloc_status_switch
leads to unlock of unacquired driver_lock. The patch moves
mutex_lock(&driver_lock) before allocation of context.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-06 11:46:20 -07:00
Randy Dunlap 939161571c staging: fix rtl8192e build errors
drivers/staging/rtl8192e/rtllib.h:2329: error: field 'wx_sem' has incomplete type
drivers/staging/rtl8192e/rtllib.h:2330: error: field 'scan_sem' has incomplete type
drivers/staging/rtl8192e/rtllib.h:2331: error: field 'ips_sem' has incomplete type
drivers/staging/rtl8192e/rtllib_wx.c:267: error: implicit declaration of function 'down'
drivers/staging/rtl8192e/rtllib_wx.c:290: error: implicit declaration of function 'up'
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-06 11:46:20 -07:00
Aaro Koskinen aef6bc7458 staging: xgifb: delete IF_DEF_ScaleLCD
Delete one more disabled feature.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-06 11:42:15 -07:00
Aaro Koskinen 3d6defadda staging: xgifb: delete IF_DEF_PWD
Delete already disabled code paths.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-06 11:42:15 -07:00
Aaro Koskinen 66cfacecc3 staging: xgifb: delete IF_DEF_OEMUtil
Delete already disabled code paths.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-06 11:42:14 -07:00
Aaro Koskinen 09cb8e509b staging: xgifb: delete Win9xDOSMode
Delete another useless flag.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-06 11:42:14 -07:00
Aaro Koskinen d2de85c5da staging: xgifb: delete IF_DEF_VideoCapture
Delete already disabled code paths.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-06 11:42:13 -07:00
Aaro Koskinen 11fbdcde54 staging: xgifb: delete duplicated timing data
Delete redundant timing data tables. Replace as follows:

	EnlargeTap4Timing	==> xgifb_tap4_timing
	NoScaleTap4Timing	==> xgifb_tap4_timing
	NTSCTap4Timing		==> xgifb_ntsc_525_tap4_timing
	YPbPr525iTap4Timing	==> xgifb_ntsc_525_tap4_timing
	YPbPr525pTap4Timing	==> xgifb_ntsc_525_tap4_timing

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-06 11:42:13 -07:00
Aaro Koskinen 0c23b6d2fe staging: xgifb: delete duplicated TV data tables
Delete redundant TV data tables. Replace as follows:

	XGI_EPLCHTVDataPtr	==> xgifb_chrontel_tv
	XGI_EPLCHTVRegPtr	==> xgifb_chrontel_tv

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-06 11:42:13 -07:00
Aaro Koskinen cc5c2aeb23 staging: xgifb: delete duplicated LCD table
XGI_EPLLCDCRT1Ptr_H and XGI_EPLLCDCRT1Ptr_V tables are identical. Replace
as follows:

	XGI_EPLLCDCRT1Ptr_H	==> xgifb_epllcd_crt1
	XGI_EPLLCDCRT1Ptr_V	==> xgifb_epllcd_crt1

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-06 11:42:12 -07:00
Aaro Koskinen ada2bda145 staging: xgifb: delete duplicated LCD data
Delete duplicated LCD data tables. Replace as follows:

	XGI_ExtLCD1400x1050Data		==> xgifb_lcd_1400x1050
	XGI_StLCD1400x1050Data		==> xgifb_lcd_1400x1050
	XGI_ExtLCD1280x1024x75Data	==> xgifb_lcd_1280x1024x75
	XGI_StLCD1280x1024x75Data	==> xgifb_lcd_1280x1024x75
	XGI_ExtLCDDes1400x1050Data	==> xgifb_lcddes_1400x1050
	XGI_StLCDDes1400x1050Data	==> xgifb_lcddes_1400x1050
	XGI_ExtLCDDLDes1400x1050Data	==> xgifb_lcddldes_1400x1050
	XGI_StLCDDLDes1400x1050Data	==> xgifb_lcddldes_1400x1050
	XGI_ExtLCDDes1024x768x75Data	==> xgifb_lcddes_1024x768x75
	XGI_StLCDDes1024x768x75Data	==> xgifb_lcddes_1024x768x75
	XGI_ExtLCDDes1280x1024x75Data	==> xgifb_lcddes_1280x1024x75
	XGI_StLCDDes1280x1024x75Data	==> xgifb_lcddes_1280x1024x75
	XGI_ExtLCDDLDes1280x1024x75Data ==> xgifb_lcddldes_1280x1024x75
	XGI_StLCDDLDes1280x1024x75Data	==> xgifb_lcddldes_1280x1024x75

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-06 11:42:12 -07:00
Aaro Koskinen 2555e9458f staging: xgifb: delete duplicated YFilter1 data
PAL-M and PAL-N "YFilter1" tables are identical. Replace as follows:

	PALMYFilter1	==> xgifb_palmn_yfilter1
	PALNYFilter1	==> xgifb_palmn_yfilter1

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-06 11:42:11 -07:00
Aaro Koskinen 80f86f8f26 staging: xgifb: delete duplicated YFilter2 data
All four "YFilter2" tables are identical. Replace as follows:

	NTSCYFilter2	==> xgifb_yfilter2;
	PALMYFilter2	==> xgifb_yfilter2;
	PALNYFilter2	==> xgifb_yfilter2;
	PALYFilter2	==> xgifb_yfilter2;

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-06 11:42:10 -07:00
Aaro Koskinen 3825b38e59 staging: xgifb: do not initialize static data to 0
Remove redundant initializations.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-06 11:42:10 -07:00
Aaro Koskinen 800d67cf9f staging: xgifb: eliminate #ifdef Tap4
Eliminate #define Tap4 and related checks.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-06 11:42:09 -07:00
Aaro Koskinen c071906146 staging: xgifb: delete commented-out routines
Delete routines which have been commented out.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-06 11:42:09 -07:00
Aaro Koskinen 64db29f5f6 staging: xgifb: refactor XGI_SetXG21LVDSPara() and XGI_SetXG27LVDSPara()
The code is almost the same for XG21 and XG27, a single routine can
cover both.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-09-06 11:42:09 -07:00