GitHub/mt8127/android_kernel_alcatel_ttab.git
12 years agostaging: comedi: double unlock in usbduxsigma_attach()
Dan Carpenter [Fri, 22 Jun 2012 07:14:59 +0000 (10:14 +0300)]
staging: comedi: double unlock in usbduxsigma_attach()

There was a double unlock introduced in 60ff461067 ("staging: comedi:
usbduxsigma: use attach_usb() hook").

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: s626: factor out the find PCI device code
H Hartley Sweeten [Thu, 21 Jun 2012 02:28:01 +0000 (19:28 -0700)]
staging: comedi: s626: factor out the find PCI device code

Factor out the code that finds a matching PCI device from attach
function.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: s626: remove private INLINE macro
H Hartley Sweeten [Thu, 21 Jun 2012 02:27:43 +0000 (19:27 -0700)]
staging: comedi: s626: remove private INLINE macro

The INLINE macro is not used in the code. Remove it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: s626: remove private DEBUG macro
H Hartley Sweeten [Thu, 21 Jun 2012 02:27:25 +0000 (19:27 -0700)]
staging: comedi: s626: remove private DEBUG macro

The private DEBUG macro defined in this driver outputs a lot
of function tracing noise. This information might be useful
when first developing the driver but should not be in the
mainlined code.

If any of this is needed in the future it should be added back
using the proper dev_printk interface.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: s626: remove forward declarations 7
H Hartley Sweeten [Thu, 21 Jun 2012 02:26:56 +0000 (19:26 -0700)]
staging: comedi: s626: remove forward declarations 7

Move up the remaining functions needed to remove the forward
declarations.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: s626: remove forward declarations 6
H Hartley Sweeten [Thu, 21 Jun 2012 02:26:31 +0000 (19:26 -0700)]
staging: comedi: s626: remove forward declarations 6

Move the enc_private_data definition down to remove the need
for the forward declarations.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: s626: remove forward declarations 5
H Hartley Sweeten [Thu, 21 Jun 2012 02:26:11 +0000 (19:26 -0700)]
staging: comedi: s626: remove forward declarations 5

Move the irq set/reset/clear and ns_to_timer helper functions
up to remove the need for the forward declarations.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: s626: remove forward declarations 4
H Hartley Sweeten [Thu, 21 Jun 2012 02:25:49 +0000 (19:25 -0700)]
staging: comedi: s626: remove forward declarations 4

Move the DAC functions up to remove the need for the forward
declarations.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: s626: remove forward declarations 3
H Hartley Sweeten [Thu, 21 Jun 2012 02:25:32 +0000 (19:25 -0700)]
staging: comedi: s626: remove forward declarations 3

Move the I2C functions up to remove the need for the forward
declarations.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: s626: remove forward declarations 2
H Hartley Sweeten [Thu, 21 Jun 2012 02:25:16 +0000 (19:25 -0700)]
staging: comedi: s626: remove forward declarations 2

Move the DEBI* i/o functions up to remove the need for the
forward declarations.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: s626: remove forward declarations 1
H Hartley Sweeten [Thu, 21 Jun 2012 02:24:47 +0000 (19:24 -0700)]
staging: comedi: s626: remove forward declarations 1

Move the s626_attach and s626_detach functions down to match
the coding style of the other comedi drivers. Then remove
the forward declarations that are no longer needed.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: s626: pointers should be cleared with NULL not 0
H Hartley Sweeten [Thu, 21 Jun 2012 02:24:19 +0000 (19:24 -0700)]
staging: comedi: s626: pointers should be cleared with NULL not 0

pdma->LogicalBase is a void *, NULL should be used to clear it not 0.

This quiets a sparse warning about:

warning: Using plain integer as NULL pointer

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: s626: local functions should not be exposed globally
H Hartley Sweeten [Thu, 21 Jun 2012 02:23:54 +0000 (19:23 -0700)]
staging: comedi: s626: local functions should not be exposed globally

The 'ResetADC' function is prototyped as a static but is missing
the static tag in it's definition. The function is only referenced
in this file so add the static tag to the definition.

This quiets a sparse warning about:

warning: symbol 'ResetADC' was not declared. Should it be static?

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agopstore/ram_core: Better ECC size checking
Anton Vorontsov [Tue, 19 Jun 2012 02:15:53 +0000 (19:15 -0700)]
pstore/ram_core: Better ECC size checking

- Instead of exploiting unsigned overflows (which doesn't work for all
  sizes), use straightforward checking for ECC total size not exceeding
  initial buffer size;

- Printing overflowed buffer_size is not informative. Instead, print
  ecc_size and buffer_size;

- No need for buffer_size argument in persistent_ram_init_ecc(),
  we can address prz->buffer_size directly.

Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
Acked-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agopstore/ram_core: Proper checking for post_init errors (e.g. improper ECC size)
Anton Vorontsov [Tue, 19 Jun 2012 02:15:52 +0000 (19:15 -0700)]
pstore/ram_core: Proper checking for post_init errors (e.g. improper ECC size)

We will implement variable-sized ECC buffers soon, so post_init routine
might fail much more likely, so we'd better check for its errors.

To make error handling simple, modify persistent_ram_free() to it be safe
at all times.

Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
Acked-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agopstore/ram: Fix error handling during przs allocation
Anton Vorontsov [Tue, 19 Jun 2012 02:15:51 +0000 (19:15 -0700)]
pstore/ram: Fix error handling during przs allocation

persistent_ram_new() returns ERR_PTR() value on errors, so during
freeing of the przs we should check for both NULL and IS_ERR() entries,
otherwise bad things will happen.

Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
Acked-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agopstore/ram: Probe as early as possible
Anton Vorontsov [Tue, 19 Jun 2012 02:15:50 +0000 (19:15 -0700)]
pstore/ram: Probe as early as possible

Registering the platform driver before module_init allows us to log oopses
that happen during device probing.

This requires changing module_init to postcore_initcall, and switching
from platform_driver_probe to platform_driver_register because the
platform device is not registered when the platform driver is registered;
and because we use driver_register, now can't use create_bundle() (since
it will try to register the same driver once again), so we have to switch
to platform_device_register_data().

Also, some __init -> __devinit changes were needed.

Overall, the registration logic is now much clearer, since we have only
one driver registration point, and just an optional dummy device, which
is created from the module parameters.

Suggested-by: Colin Cross <ccross@android.com>
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
Acked-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoiio: add vcnl4000 combined ALS and proximity sensor
Peter Meerwald [Tue, 19 Jun 2012 07:58:54 +0000 (09:58 +0200)]
iio: add vcnl4000 combined ALS and proximity sensor

minimal driver, no IR current control and proximity/event
handling yet

v5:
* checkpatch warnings
* increase msleep() to 20 ms when waiting for data ready as
  measurement/conversion can take up to 100 ms, 1 ms is too short

v4 (address comments by Jonathan Cameron)
* remove SENSORS_ prefix in Kconfig
* change from IIO_INTENSITY to IIO_LIGHT
* move from staging

v3 (address comments by Shubhrajyoti Datta)
* cleanup Kconfig entry
* call I2C read/write functions directly

v2 (address comments by Lars-Peter Clausen and Jonathan Cameron)
* unify code for reading PS and AL data into
  parameterized _measure() function
* limit wait for data to become ready within 20 tries
* drop IIO_LIGHT channel, add SCALE to IIO_INTENSITY
* drop extra string arguments used for logging purpose only

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: zsmalloc: Finish conversion to a separate module
Ben Hutchings [Wed, 20 Jun 2012 01:31:11 +0000 (02:31 +0100)]
staging: zsmalloc: Finish conversion to a separate module

ZSMALLOC is tristate, but the code has no MODULE_LICENSE and since it
depends on GPL-only symbols it cannot be loaded as a module.  This in
turn breaks zram which now depends on it.  I assume it's meant to be
Dual BSD/GPL like the other z-stuff.

There is also no module_exit, which will make it impossible to unload.
Add the appropriate module_init and module_exit declarations suggested
by comments.

Reported-by: Christian Ohm <chr.ohm@gmx.net>
References: http://bugs.debian.org/677273
Cc: stable@vger.kernel.org # v3.4
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Reviewed-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: ssv_dnp: remove empty private data
H Hartley Sweeten [Wed, 20 Jun 2012 20:50:03 +0000 (13:50 -0700)]
staging: comedi: ssv_dnp: remove empty private data

The private data struct 'dnp_private_data' contains no information.
Remove it and the alloc_private() call.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: bcm: Change order in if conditions to make more readable in nvm.c
Kevin McKinney [Wed, 20 Jun 2012 00:14:55 +0000 (20:14 -0400)]
Staging: bcm: Change order in if conditions to make more readable in nvm.c

This patch changes the order of several if conditions
to make the code more readable.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: bcm: Change conditions that check for NULL in nvm.c
Kevin McKinney [Wed, 20 Jun 2012 00:14:54 +0000 (20:14 -0400)]
Staging: bcm: Change conditions that check for NULL in nvm.c

This patch changes all conditions that check for NULL
from "if (variable == NULL)" or "if (NULL == variable)"
to "if (variable)" to make code more readable.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: bcm: Replace UINT with "unsigned int" in nvm.c
Kevin McKinney [Wed, 20 Jun 2012 00:14:53 +0000 (20:14 -0400)]
Staging: bcm: Replace UINT with "unsigned int" in nvm.c

This patch replaces all uppercase UINT with "unsigned
int".

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: bcm: Replace INT with int in nvm.c
Kevin McKinney [Wed, 20 Jun 2012 00:14:52 +0000 (20:14 -0400)]
Staging: bcm: Replace INT with int in nvm.c

This patch replaces all uppercase INT with lowercase
int.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging/ft1000: remove usage of ret in ft1000_open
Devendra Naga [Tue, 19 Jun 2012 16:23:32 +0000 (21:53 +0530)]
staging/ft1000: remove usage of ret in ft1000_open

remove the ret and do a simple  "return ft1000_submit_rx_urb"

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging/ft1000: use kzalloc to allocate the ft1000_device structure
Devendra Naga [Tue, 19 Jun 2012 16:22:38 +0000 (21:52 +0530)]
staging/ft1000: use kzalloc to allocate the ft1000_device structure

with kzalloc the allocate memory is set to zero, so no need of
calling memset again on the allocated memory

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging/ft1000: Return -ENOMEM if kmalloc fails at ft1000_probe
Devendra Naga [Tue, 19 Jun 2012 12:45:25 +0000 (18:15 +0530)]
staging/ft1000: Return -ENOMEM if kmalloc fails at ft1000_probe

If the kmalloc fails return -ENOMEM , returning 0 is not the proper
way if any function fails

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: ozwpan: Set AC_VO priority
Rupesh Gujare [Wed, 20 Jun 2012 12:36:11 +0000 (13:36 +0100)]
staging: ozwpan: Set AC_VO priority

Set packet priority to AC_VO for audio data.

Signed-off-by: Rupesh Gujare <rgujare@ozmodevices.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: ozwpan: udev support
Rupesh Gujare [Wed, 20 Jun 2012 12:36:10 +0000 (13:36 +0100)]
staging: ozwpan: udev support

Register ozmo_wpan class with sysfs & support for udev
to create device node.

Signed-off-by: Rupesh Gujare <rgujare@ozmodevices.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: ozwpan: set last_pkt_nb
Rupesh Gujare [Wed, 20 Jun 2012 12:36:09 +0000 (13:36 +0100)]
staging: ozwpan: set last_pkt_nb

In case of trigeered ISOC mode set last_pkt_nb only when
we are ready to send data.

Signed-off-by: Rupesh Gujare <rgujare@ozmodevices.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: ozwpan: kmalloc flag
Rupesh Gujare [Wed, 20 Jun 2012 12:36:08 +0000 (13:36 +0100)]
staging: ozwpan: kmalloc flag

Pass right flag as memory is assigned in process
 context.

Signed-off-by: Rupesh Gujare <rgujare@ozmodevices.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: ozwpan: Correct ioctl numbers.
Rupesh Gujare [Wed, 20 Jun 2012 12:36:07 +0000 (13:36 +0100)]
staging: ozwpan: Correct ioctl numbers.

ioctl numbers were not in order, rearranging them in ascending order.

Signed-off-by: Rupesh Gujare <rgujare@ozmodevices.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: ozwpan: ISOC transfer in triggered mode
Rupesh Gujare [Wed, 20 Jun 2012 12:36:06 +0000 (13:36 +0100)]
staging: ozwpan: ISOC transfer in triggered mode

This patch implements ISOC frame transfer while PD is in
 triggered mode.

Signed-off-by: Rupesh Gujare <rgujare@ozmodevices.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: usbdux: refactor init code
H Hartley Sweeten [Wed, 20 Jun 2012 19:02:49 +0000 (12:02 -0700)]
staging: comedi: usbdux: refactor init code

Refactor the usb driver probe/disconnect and comedi driver attach/
detach to follow the style of the other comedi driver types to
improve maintainability.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: usbduxfast: refactor init code
H Hartley Sweeten [Wed, 20 Jun 2012 19:02:28 +0000 (12:02 -0700)]
staging: comedi: usbduxfast: refactor init code

Refactor the usb driver probe/disconnect and comedi driver attach/
detach to follow the style of the other comedi driver types to
improve maintainability.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: usbduxsigma: refactor init code
H Hartley Sweeten [Wed, 20 Jun 2012 19:02:15 +0000 (12:02 -0700)]
staging: comedi: usbduxsigma: refactor init code

Refactor the usb driver probe/disconnect and comedi driver attach/
detach to follow the style of the other comedi driver types to
improve maintainability.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: vmk80xx: refactor init code
H Hartley Sweeten [Wed, 20 Jun 2012 19:01:57 +0000 (12:01 -0700)]
staging: comedi: vmk80xx: refactor init code

Refactor the usb driver probe/disconnect and comedi driver attach/
detach to follow the style of the other comedi driver types to
improve maintainability.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: vmk80xx: use module_comedi_usb_driver()
H Hartley Sweeten [Wed, 20 Jun 2012 19:01:44 +0000 (12:01 -0700)]
staging: comedi: vmk80xx: use module_comedi_usb_driver()

Use the module_comedi_usb_driver helper macro to initialize this
module. Rename the driver structs to follow the pattern of the
other comedi driver types and add some whitespace to improve
readability.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: usbduxsigma: use module_comedi_usb_driver()
H Hartley Sweeten [Wed, 20 Jun 2012 19:01:27 +0000 (12:01 -0700)]
staging: comedi: usbduxsigma: use module_comedi_usb_driver()

Use the module_comedi_usb_driver helper macro to initialize this
module. Rename the driver structs to follow the pattern of the
other comedi driver types and add some whitespace to improve
readability.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: usbduxfast: use module_comedi_usb_driver()
H Hartley Sweeten [Wed, 20 Jun 2012 19:01:14 +0000 (12:01 -0700)]
staging: comedi: usbduxfast: use module_comedi_usb_driver()

Use the module_comedi_usb_driver helper macro to initialize this
module. Rename the driver structs to follow the pattern of the
other comedi driver types and add some whitespace to improve
readability.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: usbdux: use module_comedi_usb_driver()
H Hartley Sweeten [Wed, 20 Jun 2012 19:00:57 +0000 (12:00 -0700)]
staging: comedi: usbdux: use module_comedi_usb_driver()

Use the module_comedi_usb_driver helper macro to initialize this
module. Rename the driver structs to follow the pattern of the
other comedi driver types and add some whitespace to improve
readability.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: Kconfig: remove redundant depends on tests
H Hartley Sweeten [Tue, 19 Jun 2012 23:20:31 +0000 (16:20 -0700)]
staging: comedi: Kconfig: remove redundant depends on tests

The 'depends on COMEDI_ISA_DRIVERS' for COMEDI_AMPLC_DIO200_ISA is
not needed. This option is alread in an if/endif block that will
satisy the check.

The 'depends on COMEDI' for COMEDI_NI_COMMON was missed when all
the comedi options were wrapped in an if/endif block.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: Kconfig: menuconfig options should be bool
H Hartley Sweeten [Tue, 19 Jun 2012 23:20:28 +0000 (16:20 -0700)]
staging: comedi: Kconfig: menuconfig options should be bool

The menuconfig options to enable the various comedi driver types
should be bool not tristate. They don't directly affect the
building of the kernel, they just allow other options to be
selected.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: remove CONFIG_COMEDI_PCI define
H Hartley Sweeten [Tue, 19 Jun 2012 23:20:23 +0000 (16:20 -0700)]
staging: comedi: remove CONFIG_COMEDI_PCI define

CONFIG_COMEDI_PCI is not actually a Kconfig option. It is defined
in the comedidev.h header based on another Kconfig option being
enabled.

It is only referenced in the skel driver to conditionally compile
in the PCI support code. Use the CONFIG_COMEDI_PCI_DRIVERS Kconfig
option instead and remove the define.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: remove unused CONFIG_COMEDI_PCMCIA define
H Hartley Sweeten [Tue, 19 Jun 2012 23:20:17 +0000 (16:20 -0700)]
staging: comedi: remove unused CONFIG_COMEDI_PCMCIA define

CONFIG_COMEDI_PCMCIA is not actually a Kconfig option. It is
defined in the comedidev.h header based on another Kconfig
option being enbled.

Just remove it since the define is not used by any of the comedi
drivers.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: Kconfig: fix drivers that require the 8255 driver
H Hartley Sweeten [Tue, 19 Jun 2012 23:20:05 +0000 (16:20 -0700)]
staging: comedi: Kconfig: fix drivers that require the 8255 driver

Many of the comedi drivers require the 8255 driver for
various subdevice support. The Makefile currently uses
CONFIG_COMEDI_PCI_DRIVERS to make sure the 8255 driver
is compiled. The Kconfig help for that option says that
it does not directly affect the kernel.

Fix this by adding 'select COMEDI_8255' to the drivers
that actually need the support.

Also, remove two cases where the drivers don't require
the 8255 support.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: shrink comedi_compat32.h
Ian Abbott [Tue, 19 Jun 2012 09:58:16 +0000 (10:58 +0100)]
staging: comedi: shrink comedi_compat32.h

"comedi_compat32.h" #include's <linux/compat.h>, but that is only needed
by "comedi_compat32.c" so move the #include to that file.  Also,
"comedi_compat.h" doesn't really need the '#include <linux/fs.h>' just
to declare 'struct file' as it only uses it to construct a pointer to
that type.  Replace that #include with an incomplete declaration of
'struct file' and move that #include into "comedi_compat32.c".

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: remove comedi_fops.h
Ian Abbott [Tue, 19 Jun 2012 09:17:46 +0000 (10:17 +0100)]
staging: comedi: remove comedi_fops.h

Move the contents of "comedi_fops.h" into "comedi_internal.h" and delete
"comedi_fops.h". It only contains a couple of external variable
declarations (and #include <linux/types.h>) and one of those isn't even
declared in "comedi_fops.c".  The other one is an external declaration
of a variable used to store a module parameter and some of those are
already externally declared in "comedi_internal.h", so they can keep it
company!

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: comedi_internal.h inclusion guards
Ian Abbott [Tue, 19 Jun 2012 09:17:45 +0000 (10:17 +0100)]
staging: comedi: comedi_internal.h inclusion guards

Add a multiple inclusion guard macro to "comedi_internal.h".

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: rename internal.h to comedi_internal.h
Ian Abbott [Tue, 19 Jun 2012 09:17:44 +0000 (10:17 +0100)]
staging: comedi: rename internal.h to comedi_internal.h

Use a less generic name for this internal header file included by
various parts of the comedi core.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: make class and file operations static
Ian Abbott [Tue, 19 Jun 2012 09:17:43 +0000 (10:17 +0100)]
staging: comedi: make class and file operations static

A couple of global variables in "comedi_fops.c" are only referenced from
that .c file and can be declared 'static'.  Also remove them from
"comedi_fops.h" where they are declared 'extern'.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: csr: provide a MODULE_LICENSE for csr_helper.ko
Greg Kroah-Hartman [Wed, 20 Jun 2012 19:53:58 +0000 (12:53 -0700)]
Staging: csr: provide a MODULE_LICENSE for csr_helper.ko

I forgot a license for the csr_helper module, so it would not properly
load as it depends on other GPL-only symbols.

Reported-by: Lauri Hintsala <lauri.hintsala@bluegiga.com>
Cc: Mikko Virkkilä <mikko.virkkila@bluegiga.com>
Cc: Riku Mettälä <riku.mettala@bluegiga.com>
Cc: Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: csr: update to version 5.1.0 of the driver
Greg Kroah-Hartman [Wed, 20 Jun 2012 00:33:16 +0000 (17:33 -0700)]
Staging: csr: update to version 5.1.0 of the driver

This brings the in-kernel driver up to the level of the
csr-linux-wifi-5.1.0-oss.tar.gz tarball.

Cc: Mikko Virkkilä <mikko.virkkila@bluegiga.com>
Cc: Lauri Hintsala <Lauri.Hintsala@bluegiga.com>
Cc: Riku Mettälä <riku.mettala@bluegiga.com>
Cc: Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: add CSR wifi module
Greg Kroah-Hartman [Tue, 19 Jun 2012 23:15:42 +0000 (16:15 -0700)]
Staging: add CSR wifi module

This consists of two modules, the driver, and a "helper" module that is
just a wrapper around common kernel functions.  The wrapper module will
be removed soon, but for now it's needed.

These files were based on the csr-linux-wifi-5.0.3-oss.tar.gz package
provided by CSR and Blue Giga, and is covered under the license
specified in the LICENSE.txt file (basically dual BSD and GPLv2).  The
files were flattened out of the deep directory mess they were originally
in, and a few EXPORT_SYMBOL_GPL() were added in order for everything to
link properly with the helper module setup.

Cc: Mikko Virkkilä <mikko.virkkila@bluegiga.com>
Cc: Lauri Hintsala <Lauri.Hintsala@bluegiga.com>
Cc: Riku Mettälä <riku.mettala@bluegiga.com>
Cc: Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: add CSR Wifi "os helper" module
Greg Kroah-Hartman [Thu, 24 May 2012 16:47:38 +0000 (09:47 -0700)]
Staging: add CSR Wifi "os helper" module

This module is used by the CSR wifi driver to "abstract" away the
OS-specific parts of core functions.  It will be eventually deleted, but
for now is needed as the CSR driver relies on it.

Cc: Mikko Virkkilä <mikko.virkkila@bluegiga.com>
Cc: Lauri Hintsala <Lauri.Hintsala@bluegiga.com>
Cc: Riku Mettälä <riku.mettala@bluegiga.com>
Cc: Veli-Pekka Peltola <veli-pekka.peltola@bluegiga.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: comedi_compat_ioctl should be NULL not 0
H Hartley Sweeten [Mon, 18 Jun 2012 23:53:17 +0000 (16:53 -0700)]
staging: comedi: comedi_compat_ioctl should be NULL not 0

When CONFIG_COMPAT is not defined, comedi_compat_ioctl should be
NULL not 0 in order to set the file_operations compat_ioctl variable
correctly.

This quiets a sparse warning about:

warning: Using plain integer as NULL pointer

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: pcmmio: quiet NULL pointer sparse noise
H Hartley Sweeten [Tue, 19 Jun 2012 00:03:17 +0000 (17:03 -0700)]
staging: comedi: pcmmio: quiet NULL pointer sparse noise

The comedi_async 'inttrig' member is a pointer to a callback
function. NULL should be used to clear it not 0.

This quiets a number of sparse warnings about:

Warning: Using plain integer as NULL pointer

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoiio staging: another typo in iio_simple_dummy_buffer
Peter Meerwald [Mon, 18 Jun 2012 18:33:04 +0000 (20:33 +0200)]
iio staging: another typo in iio_simple_dummy_buffer

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoiio: remove extra ; after function definition
Peter Meerwald [Mon, 18 Jun 2012 18:33:03 +0000 (20:33 +0200)]
iio: remove extra ; after function definition

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoiio: correct documentation for IIO_CONST_ATTR_SAMP_FREQ_AVAIL, match name of #define
Peter Meerwald [Mon, 18 Jun 2012 18:33:02 +0000 (20:33 +0200)]
iio: correct documentation for IIO_CONST_ATTR_SAMP_FREQ_AVAIL, match name of #define

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoiio: typo in iio_chan_spec.ext_info comment
Peter Meerwald [Mon, 18 Jun 2012 18:33:01 +0000 (20:33 +0200)]
iio: typo in iio_chan_spec.ext_info comment

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoiio staging: fix spelling of suppression in isl29018
Peter Meerwald [Mon, 18 Jun 2012 18:33:07 +0000 (20:33 +0200)]
iio staging: fix spelling of suppression in isl29018

beware, does change the ABI as proximity_on_chip_ambient_infrared_supression
is changed to proximity_on_chip_ambient_infrared_suppression

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoiio staging: fix tsl2x7x file mode
Peter Meerwald [Mon, 18 Jun 2012 18:33:05 +0000 (20:33 +0200)]
iio staging: fix tsl2x7x file mode

just drop execute permission

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoiio staging: fix typos in tsl*: register
Peter Meerwald [Mon, 18 Jun 2012 18:33:06 +0000 (20:33 +0200)]
iio staging: fix typos in tsl*: register

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging:iio:adc:ad799x: Use new triggered buffer setup helper function
Lars-Peter Clausen [Mon, 18 Jun 2012 16:33:56 +0000 (18:33 +0200)]
staging:iio:adc:ad799x: Use new triggered buffer setup helper function

Use the new triggered buffer setup helper function to allocate and register
buffer and pollfunc.

Also as part of the conversion drop scan_timestamp being enabled by default,
since it is a left over of an earlier cleanup.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging:iio:adc:ad7887: Use new triggered buffer setup helper function
Lars-Peter Clausen [Mon, 18 Jun 2012 16:33:55 +0000 (18:33 +0200)]
staging:iio:adc:ad7887: Use new triggered buffer setup helper function

Use the new triggered buffer setup helper function to allocate and register
buffer and pollfunc.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging:iio:adc:ad7793: Use new triggered buffer setup helper function
Lars-Peter Clausen [Mon, 18 Jun 2012 16:33:54 +0000 (18:33 +0200)]
staging:iio:adc:ad7793: Use new triggered buffer setup helper function

Use the new triggered buffer setup helper function to allocate and register
buffer and pollfunc.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging:iio:adc:ad7606: Use new triggered buffer setup helper function
Lars-Peter Clausen [Mon, 18 Jun 2012 16:33:53 +0000 (18:33 +0200)]
staging:iio:adc:ad7606: Use new triggered buffer setup helper function

Use the new triggered buffer setup helper function to allocate and register
buffer and pollfunc.

Also as part of the conversion drop scan_timestamp being enabled by default,
since it is a left over of an earlier cleanup.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging:iio:adc:ad7476: Use new triggered buffer setup helper function
Lars-Peter Clausen [Mon, 18 Jun 2012 16:33:52 +0000 (18:33 +0200)]
staging:iio:adc:ad7476: Use new triggered buffer setup helper function

Use the new triggered buffer setup helper function to allocate and register
buffer and pollfunc.

Also as part of the conversion drop scan_timestamp being enabled by default,
since it is a left over of an earlier cleanup.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging:iio:adc:ad7298: Use new triggered buffer setup helper function
Lars-Peter Clausen [Mon, 18 Jun 2012 16:33:51 +0000 (18:33 +0200)]
staging:iio:adc:ad7298: Use new triggered buffer setup helper function

Use the new triggered buffer setup helper function to allocate and register
buffer and pollfunc.

The previous code was not passing the temperature channel to iio_buffer_register
since the temperature channel can not be used in buffered mode. With the new
helper functions it is not possible to do this, instead the scan index for the
temperature channel is set to -1 which will cause iio_buffer_register to ignore
the channel. (Also While we are at it also assign the symbolic constant instead
of the raw value to the channel address for the temperature channel).

Also as part of the conversion drop scan_timestamp being enabled by default,
since it is a left over of an earlier cleanup.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging:iio:adc:ad7192: Use new triggered buffer setup helper function
Lars-Peter Clausen [Mon, 18 Jun 2012 16:33:50 +0000 (18:33 +0200)]
staging:iio:adc:ad7192: Use new triggered buffer setup helper function

Use the new triggered buffer setup helper function to allocate and register
buffer and pollfunc.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoiio:adc:at91: Use new triggered buffer setup helper
Lars-Peter Clausen [Mon, 18 Jun 2012 16:33:49 +0000 (18:33 +0200)]
iio:adc:at91: Use new triggered buffer setup helper

Use the new triggered buffer setup helper function to allocate and register
buffer and pollfunc.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoiio: Add helper function for initializing triggered buffers
Lars-Peter Clausen [Mon, 18 Jun 2012 16:33:48 +0000 (18:33 +0200)]
iio: Add helper function for initializing triggered buffers

Add a helper function for executing the common tasks which are usually involved
in setting up a simple software ringbuffer. It will allocate the buffer,
allocate the pollfunc and register the buffer.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoiio: iio_buffer_register: Skip channels with negative scan index
Lars-Peter Clausen [Mon, 18 Jun 2012 16:33:47 +0000 (18:33 +0200)]
iio: iio_buffer_register: Skip channels with negative scan index

It is not always the case that all channels can be used in buffered mode. This
patch allows channels, which can not be used in buffered mode, to set their scan
index to a negative number, which will cause iio_buffer_register to ignore the
channel.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: slicoss: Fix a typo.
Justin P. Mattock [Mon, 18 Jun 2012 14:42:24 +0000 (07:42 -0700)]
staging: slicoss: Fix a typo.

The below patch fixes a typo found while reading through staging/slicoss

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: serqt_usb2: Fix some typos.
Justin P. Mattock [Mon, 18 Jun 2012 14:42:23 +0000 (07:42 -0700)]
staging: serqt_usb2: Fix some typos.

Fixes some typos that was found while reading through staging/serqt_usb2

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: xgifb: Replace pr_* with dev_* when possible.
Miguel Gómez [Mon, 18 Jun 2012 11:12:06 +0000 (13:12 +0200)]
Staging: xgifb: Replace pr_* with dev_* when possible.

Replace pr_* calls with dev_* ones when the device structure is available.

Signed-off-by: Miguel Gómez <magomez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: xgifb: Fix sparse warnings.
Miguel Gómez [Mon, 18 Jun 2012 11:12:05 +0000 (13:12 +0200)]
Staging: xgifb: Fix sparse warnings.

Add include files with function definitions to avoid sparse warnings.

Signed-off-by: Miguel Gómez <magomez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: xgifb: Remove printk usage.
Miguel Gómez [Mon, 18 Jun 2012 11:12:04 +0000 (13:12 +0200)]
Staging: xgifb: Remove printk usage.

Replace meaninful printks with pr_debug and remove useless ones.

Signed-off-by: Miguel Gómez <magomez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: xgifb: Remove XGIFAIL() macro and its calls.
Miguel Gómez [Mon, 18 Jun 2012 11:12:03 +0000 (13:12 +0200)]
Staging: xgifb: Remove XGIFAIL() macro and its calls.

XGIFAIL() prints a message and returns a value, but it's used only in one
place. Better remove it and replace the call with the macro content.

Signed-off-by: Miguel Gómez <magomez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: xgifb: define real dumpVGAReg() content only in DEBUG mode.
Miguel Gómez [Mon, 18 Jun 2012 11:12:02 +0000 (13:12 +0200)]
Staging: xgifb: define real dumpVGAReg() content only in DEBUG mode.

Define real content of dumpVGAReg() only in debug mode. Remove old condition.

Signed-off-by: Miguel Gómez <magomez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: xgifb: remove DPRINTK() macro and replace it with pr_debug.
Miguel Gómez [Mon, 18 Jun 2012 11:12:01 +0000 (13:12 +0200)]
Staging: xgifb: remove DPRINTK() macro and replace it with pr_debug.

Signed-off-by: Miguel Gómez <magomez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: xgifb: remove DEBUGPRN() macro and its uses.
Miguel Gómez [Mon, 18 Jun 2012 11:12:00 +0000 (13:12 +0200)]
Staging: xgifb: remove DEBUGPRN() macro and its uses.

Remove DEBUGPRN() macro which is defined as empty.

Signed-off-by: Miguel Gómez <magomez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: xgifb: reformat module parameter descriptions.
Miguel Gómez [Mon, 18 Jun 2012 11:11:59 +0000 (13:11 +0200)]
Staging: xgifb: reformat module parameter descriptions.

Signed-off-by: Miguel Gómez <magomez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: comedi_subdevice 'io_bits' should be an unsigned int
H Hartley Sweeten [Mon, 18 Jun 2012 21:45:42 +0000 (14:45 -0700)]
staging: comedi: comedi_subdevice 'io_bits' should be an unsigned int

The 'io_bits' variable in the comedi_subdevice struct is a bitmask of
the input/output configuration of the the subdevice. It should be an
unsigned int to correctly represent this.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess: <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: fix return value for insn_bits functions
H Hartley Sweeten [Mon, 18 Jun 2012 20:16:35 +0000 (13:16 -0700)]
staging: comedi: fix return value for insn_bits functions

The comedi_subdevice 'insn_bits' functions return the number of data
elements used to perform the command. Most of the insn_bits functions
return an open coded '2' to indicate this. The same value is available
as 'insn->n'. Return that instead to better indicate what the return
means.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: remove unneeded sanity check in insn_bits functions
H Hartley Sweeten [Mon, 18 Jun 2012 18:18:25 +0000 (11:18 -0700)]
staging: comedi: remove unneeded sanity check in insn_bits functions

The comedi core does the sanity check to make sure that the data length
the INSN_BITS instruction is 2. There is no need for the drivers to do
this check. Remove all the sanity checks in the drivers.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: usbduxsigma: use attach_usb() hook
Ian Abbott [Mon, 18 Jun 2012 15:35:54 +0000 (16:35 +0100)]
staging: comedi: usbduxsigma: use attach_usb() hook

Change the usbduxsigma driver to use the new attach_usb() hook in struct
comedi_driver to auto-configure probed USB devices after the firmware is
loaded.

Move the release of the driver's static 'start_stop_sem' semaphore in
usbduxsigma_attach() to occur a bit later for convenience, otherwise the
new usbduxsigma_attach_common() would need to be split in two.  I don't
think the slight delay in releasing the semaphore matters too much; it's
only used in the USB probe and disconnect functions and when attaching
and detaching comedi devices.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: vmk80xx: use attach_usb() hook
Ian Abbott [Mon, 18 Jun 2012 16:36:58 +0000 (17:36 +0100)]
staging: comedi: vmk80xx: use attach_usb() hook

Change the vmv80xx driver to use the new attach_usb() hook in struct
comedi_driver to auto-configure probed USB devices after the firmware is
loaded.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: usbduxfast: use attach_usb() hook
Ian Abbott [Mon, 18 Jun 2012 14:16:44 +0000 (15:16 +0100)]
staging: comedi: usbduxfast: use attach_usb() hook

Change the usbduxfast driver to use the new attach_usb() hook in struct
comedi_driver to auto-configure probed USB devices after the firmware is
loaded.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: change device used in dev_...() calls
Ian Abbott [Mon, 18 Jun 2012 13:05:34 +0000 (14:05 +0100)]
staging: comedi: change device used in dev_...() calls

A previous set of patches by Ravishankar Karkala Mallikarjunayya
replaced a load of printk() calls with dev_info(), dev_err(), etc.
Unfortunately, these used the 'struct device *hw_dev' member of 'struct
comedi_device') as the first parameter of these dev_...() calls, but
that pointer is usually NULL, so the kernel log messages come out a bit
wrong (they contain the phrase "(NULL device *)").

Use the 'struct device *class_dev' member of 'struct comedi_device'
instead for these dev_...() calls.  It will be non-NULL and somewhat
meaningful to users.  It's also consistent with those comedi drivers
that already use the class_dev member in their dev_...() calls.

Some of the messages included the format "comedi%d" with the minor
device number used for the "%d".  This is now redundant as it will be
the same as the dev_name() part of the kernel log message produced by
the dev_...() calls.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: speakup: fix an improperly-declared variable.
Christopher Brannon [Sat, 16 Jun 2012 21:55:20 +0000 (16:55 -0500)]
Staging: speakup: fix an improperly-declared variable.

A local static variable was declared as a pointer to a string
constant.  We're assigning to the underlying memory, so it
needs to be an array instead.

Signed-off-by: Christopher Brannon <chris@the-brannons.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: fix Kconfig for COMEDI_PCMCIA_DRIVERS
H Hartley Sweeten [Fri, 15 Jun 2012 16:18:55 +0000 (09:18 -0700)]
staging: comedi: fix Kconfig for COMEDI_PCMCIA_DRIVERS

The depends on PCCARD is redundant. All of the comedi PCMCIA
drivers depend on PCMCIA which can only be enabled if PCCARD
is enabled. Remove the extra depends check.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Tested-by: Ian Abbott <abbotti@mev.co.uk>
Reported-by: Randy Dunlap <rdunlap@xenotime.net>
Acked-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoiio: buffer: Fix NULL pointer deref caused by empty scan mask
Lars-Peter Clausen [Fri, 15 Jun 2012 16:08:59 +0000 (18:08 +0200)]
iio: buffer: Fix NULL pointer deref caused by empty scan mask

iio_scan_mask_match() returns NULL if the passed in scan mask is empty. This
will happen if no channel has been selected and buffer is enabled.
iio_sw_buffer_preenable() will assign NULL to indio_dev->active_scan_mask in
this case. As a result iio_update_demux() will cause a NULL pointer deref,
because it expects active_scan_mask to be non-NULL.

Since it does not make much sense to start data capture if there is no data to
capture this patch updates the code to fail gracefully in iio_scan_mask_match()
instead of crashing the kernel.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoiio: iio/events.h typos
Peter Meerwald [Fri, 15 Jun 2012 17:25:28 +0000 (19:25 +0200)]
iio: iio/events.h typos

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: iio:: fix some typos
Peter Meerwald [Fri, 15 Jun 2012 17:25:27 +0000 (19:25 +0200)]
staging: iio:: fix some typos

typos in comments, fix ring_sw module description

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: iio: add IIO_ALTVOLTAGE to iio_event_monitor example
Peter Meerwald [Fri, 15 Jun 2012 17:25:26 +0000 (19:25 +0200)]
staging: iio: add IIO_ALTVOLTAGE to iio_event_monitor example

IIO_ALTVOLTAGE is used by frequency/adf4350 and frequency/ad9523

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoiio: iio/machine.h typo
Peter Meerwald [Fri, 15 Jun 2012 17:25:25 +0000 (19:25 +0200)]
iio: iio/machine.h typo

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoiio: cleanup sysfs-bus-iio-light-lm3533-als
Peter Meerwald [Fri, 15 Jun 2012 17:25:24 +0000 (19:25 +0200)]
iio: cleanup sysfs-bus-iio-light-lm3533-als

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoiio: sysfs-bus-iio typo
Peter Meerwald [Fri, 15 Jun 2012 17:25:23 +0000 (19:25 +0200)]
iio: sysfs-bus-iio typo

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>