GitHub/LineageOS/G12/android_kernel_amlogic_linux-4.9.git
12 years agostaging: sm7xx: use dynamic debug support
Javier M. Mellid [Thu, 26 Apr 2012 18:45:51 +0000 (20:45 +0200)]
staging: sm7xx: use dynamic debug support

This patch uses dynamic debug support.

Tested with SM712

Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: sm7xx: dead code removal
Javier M. Mellid [Thu, 26 Apr 2012 18:45:50 +0000 (20:45 +0200)]
staging: sm7xx: dead code removal

This patch remove dead code.

Tested with SM712.

Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: sm7xx: remove old references and non updated comments
Javier M. Mellid [Thu, 26 Apr 2012 18:45:49 +0000 (20:45 +0200)]
staging: sm7xx: remove old references and non updated comments

This patch removes obsolete references to previous code and non updated
comments.

Tested with SM712

Signed-off-by: Javier M. Mellid <jmunhoz@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoMAINTAINERS: Add new Industrial I/O subsystem location
Lars-Peter Clausen [Thu, 26 Apr 2012 11:46:42 +0000 (13:46 +0200)]
MAINTAINERS: Add new Industrial I/O subsystem location

Add the new out-of-staging IIO directory to the IIO MAINTAINERS file entry.

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: core: iio_chan_spec_ext_info: Add private handle
Michael Hennerich [Fri, 27 Apr 2012 08:58:36 +0000 (10:58 +0200)]
iio: core: iio_chan_spec_ext_info: Add private handle

There is currently no user, but we might need it in future.
So better add it now, before we have to convert drivers afterwards.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoiio: frequency: Update DDS drivers to use new channel naming convention
Michael Hennerich [Fri, 27 Apr 2012 08:58:35 +0000 (10:58 +0200)]
iio: frequency: Update DDS drivers to use new channel naming convention

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoiio: core: Introduce IIO_ALTVOLTAGE and appropriate channel info elements
Michael Hennerich [Fri, 27 Apr 2012 08:58:34 +0000 (10:58 +0200)]
iio: core: Introduce IIO_ALTVOLTAGE and appropriate channel info elements

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoiio: Rename iio/dds to iio/frequency
Michael Hennerich [Fri, 27 Apr 2012 08:58:33 +0000 (10:58 +0200)]
iio: Rename iio/dds to iio/frequency

Generalize naming to allow other frequency synthesis techniques as well.
No functional changes.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging:iio: Streamline API function naming
Lars-Peter Clausen [Thu, 26 Apr 2012 11:35:01 +0000 (13:35 +0200)]
staging:iio: Streamline API function naming

Currently we use two different naming schemes in the IIO API, iio_verb_object
and iio_object_verb. E.g iio_device_register and iio_allocate_device. This
patches renames instances of the later to the former. The patch also renames allocate to
alloc as this seems to be the preferred form throughout the kernel.

In particular the following renames are performed by the patch:
iio_put_device -> iio_device_put
iio_allocate_device -> iio_device_alloc
iio_free_device -> iio_device_free
iio_get_trigger -> iio_trigger_get
iio_put_trigger -> iio_trigger_put
iio_allocate_trigger -> iio_trigger_alloc
iio_free_trigger -> iio_trigger_free

The conversion was done with the following coccinelle patch with manual fixes to
comments and documentation.

<smpl>
@@
@@
-iio_put_device
+iio_device_put
@@
@@
-iio_allocate_device
+iio_device_alloc
@@
@@
-iio_free_device
+iio_device_free
@@
@@
-iio_get_trigger
+iio_trigger_get
@@
@@
-iio_put_trigger
+iio_trigger_put
@@
@@
-iio_allocate_trigger
+iio_trigger_alloc
@@
@@
-iio_free_trigger
+iio_trigger_free
</smpl>

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: lpc32xx-adc: Remove driver conflict due to device tree
Roland Stigge [Thu, 26 Apr 2012 20:10:51 +0000 (22:10 +0200)]
staging: iio: lpc32xx-adc: Remove driver conflict due to device tree

Previously, the touchscreen and ADC drivers of the LPC32xx SoC had a Kconfig
conflict declared because they use the same hardware. Upon the introduction of
device tree support in both drivers, the conflict must be removed to enable
the same kernel to support different hardware (configured via the device tree).

Signed-off-by: Roland Stigge <stigge@antcom.de>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: VME: move VME drivers out of staging
Greg Kroah-Hartman [Thu, 26 Apr 2012 19:34:58 +0000 (12:34 -0700)]
Staging: VME: move VME drivers out of staging

This moves the VME core, VME board drivers, and VME bridge drivers out
of the drivers/staging/vme/ area to drivers/vme/.

The VME device drivers have not moved out yet due to some API questions
they are still working through, that should happen soon, hopefully.

Cc: Martyn Welch <martyn.welch@ge.com>
Cc: Manohar Vanga <manohar.vanga@cern.ch>
Cc: Vincent Bossier <vincent.bossier@gmail.com>
Cc: "Emilio G. Cota" <cota@braap.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: ozwpan: Fix bug where kfree is called twice.
Rupesh Gujare [Wed, 25 Apr 2012 22:54:58 +0000 (23:54 +0100)]
staging: ozwpan: Fix bug where kfree is called twice.

Signed-off-by: Rupesh Gujare <rgujare@ozmodevices.com>
Signed-off-by: Chris Kelly <ckelly@ozmodevices.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: vme: vme.c: fix minor coding style issues
Greg Kroah-Hartman [Wed, 25 Apr 2012 18:25:46 +0000 (11:25 -0700)]
staging: vme: vme.c: fix minor coding style issues

Fix up some broken printk strings that were spanning multiple lines,
making it hard to search for them.

Cc: Manohar Vanga <manohar.vanga@cern.ch>
Cc: Martyn Welch <martyn.welch@ge.com>
Cc: "Emilio G. Cota" <cota@braap.org>
Cc: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoIIO: Move the core abi documentation from staging
Jonathan Cameron [Wed, 25 Apr 2012 14:55:00 +0000 (15:55 +0100)]
IIO: Move the core abi documentation from staging

This file contains only the most generic elements. Other
class specific and device specific ABI documents will follow
over time.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoIIO: Move the core files to drivers/iio
Jonathan Cameron [Wed, 25 Apr 2012 14:54:59 +0000 (15:54 +0100)]
IIO: Move the core files to drivers/iio

Take the core support + the kfifo buffer implentation out of
staging.  Whilst we are far from done in improving this subsystem
it is now at a stage where the userspae interfaces (provided by
the core) can be considered stable.

Drivers will follow over a longer time scale.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoIIO: Move core headers to include/linux/iio
Jonathan Cameron [Wed, 25 Apr 2012 14:54:58 +0000 (15:54 +0100)]
IIO: Move core headers to include/linux/iio

Step 1 in moving the IIO core out of staging.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging:iio:Documentation Trivial typo fixes.
Jonathan Cameron [Wed, 25 Apr 2012 14:54:57 +0000 (15:54 +0100)]
staging:iio:Documentation Trivial typo fixes.

Just a couple of things I came across whilst reviewing this file for
moving out of staging. I doubt anyone cares, but seemed sensible to fix
them now!

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging:iio:documentation pull a few sysfs entries out of main docs.
Jonathan Cameron [Wed, 25 Apr 2012 14:54:56 +0000 (15:54 +0100)]
staging:iio:documentation pull a few sysfs entries out of main docs.

These two attributes are only used in the one driver.  Whilst they
are fairly general I'm not entirely happy committing to them at
this stage.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging,ozwpan: Fix typo in comments within staging/ozwpan
Masanari Iida [Wed, 25 Apr 2012 14:28:35 +0000 (23:28 +0900)]
staging,ozwpan: Fix typo in comments within staging/ozwpan

Correct spelling in comments withon staging/ozwpan

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Acked-by: Chris Kelly <ckelly@ozmodevices.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agozsmalloc: use PageFlag macro instead of [set|test]_bit
Minchan Kim [Wed, 25 Apr 2012 06:23:09 +0000 (15:23 +0900)]
zsmalloc: use PageFlag macro instead of [set|test]_bit

MM code always uses PageXXX to handle page flags.
Let's keep the consistency.

Signed-off-by: Minchan Kim <minchan@kernel.org>
Acked-by: Nitin Gupta <ngupta@vflare.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging:iio:dac:ad5446: Update Kconfig entry
Lars-Peter Clausen [Wed, 25 Apr 2012 07:45:02 +0000 (09:45 +0200)]
staging:iio:dac:ad5446: Update Kconfig entry

There is one device supported by the driver which is not listed in the Kconfig
help test. This patch adds it. Also we are past the point were we can possible
fit all devices supported by the driver in the Kconfig entry title, so just list
the initial device that was supported by this driver and note that similar
devices are supported as well.

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:dac:ad5446: Add support for the AD5662
Lars-Peter Clausen [Wed, 25 Apr 2012 07:45:01 +0000 (09:45 +0200)]
staging:iio:dac:ad5446: Add support for the AD5662

The AD5662 is compatible to the AD5660, but uses an external
reference instead of an internal.

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:dac:ad5446: Return cached value for 'raw' attribute
Lars-Peter Clausen [Wed, 25 Apr 2012 07:45:00 +0000 (09:45 +0200)]
staging:iio:dac:ad5446: Return cached value for 'raw' attribute

We can not read back the value from the device, but we cache the value anyway so
we might as well return the cached value instead of an error.

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:dac:ad5446: Consolidate store_sample and store_pwr_down functions
Lars-Peter Clausen [Wed, 25 Apr 2012 07:44:59 +0000 (09:44 +0200)]
staging:iio:dac:ad5446: Consolidate store_sample and store_pwr_down functions

The devices supported by this drivers only have a single shift register, which
contains both the power down mode and the output sample. So writing the power
down mode and the output sample can be done by the same function. Call this
function prepare_write as it will prepare the spi message for a write. Also
introduce a small helper function which performs the whole write by calling the
chip the specific prepare function followed by a spi_sync.

The two power down bits are always placed ontop of the msb of the output sample,
so we can easily calculate their position by adding the channels shift to the
channels realbits.

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:dac:ad5446: Convert to extended channel attributes
Lars-Peter Clausen [Wed, 25 Apr 2012 07:44:58 +0000 (09:44 +0200)]
staging:iio:dac:ad5446: Convert to extended channel attributes

Use extended channel attributes instead of raw sysfs files for the additional
channel attributes.

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:dac:ad5446: Remove duplicated chip_info entries
Lars-Peter Clausen [Wed, 25 Apr 2012 07:44:57 +0000 (09:44 +0200)]
staging:iio:dac:ad5446: Remove duplicated chip_info entries

There are three identical chip_info entries. Remove two of them and use the id
of the remaining entry for all three device table entries.

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:dac:ad5446: Do not check for individual chip ids in probe
Lars-Peter Clausen [Wed, 25 Apr 2012 07:44:56 +0000 (09:44 +0200)]
staging:iio:dac:ad5446: Do not check for individual chip ids in probe

Use the chip_info's int_vref_mv field to decide whether a certain chip has a
internal reference or not. There is no need to check for individual chip ids.

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:dac:ad5446: Remove unused struct field
Lars-Peter Clausen [Wed, 25 Apr 2012 07:44:55 +0000 (09:44 +0200)]
staging:iio:dac:ad5446: Remove unused struct field

Remove the unused "poll_work" field from the ad5446_state struct.

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:dac:ad5446: Fix 24bit transfers
Lars-Peter Clausen [Wed, 25 Apr 2012 07:44:54 +0000 (09:44 +0200)]
staging:iio:dac:ad5446: Fix 24bit transfers

We currently only write 16 bit in case where we should write 24 bit. The spi message
length is calculated from the channel storage_size, but since the storage size
is only 16 bit we end up with the wrong value for devices which have power down
bits and thus a register with 24 bit. Since each store function knows how many
bytes it has to write just use the spi_write function from there instead of
going through the hassle of manually preparing a spi_message and keeping buffers
in the state struct.

Another advantage of this patch is that it will make implementing support for
similar I2C based DACs much easier.

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:dac:ad5446: Remove duplicated write sample functions
Lars-Peter Clausen [Wed, 25 Apr 2012 07:44:53 +0000 (09:44 +0200)]
staging:iio:dac:ad5446: Remove duplicated write sample functions

AD5620_LOAD and AD5446_LOAD are both 0, so all these three functions are
identical and we can replace them with only one.

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:dac:ad5446: Do not exit powerdown when writing a sample
Lars-Peter Clausen [Wed, 25 Apr 2012 07:44:52 +0000 (09:44 +0200)]
staging:iio:dac:ad5446: Do not exit powerdown when writing a sample

Both the powerdown mode bits and the sample value are stored in the same
register, so writing a sample while the device is powered down will clear the
power down bits. To avoid this only update the cached value when the device is
powered down.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
----
v1 actually had a small bug in that it would still write to the device's
register when the sample was updated while the device was powered down. This was
not critical since it would send out the powerdown mode again.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: iio: tsl2x7x: bugfixes
Jon Brenner [Tue, 24 Apr 2012 22:59:10 +0000 (17:59 -0500)]
staging: iio: tsl2x7x: bugfixes

TAOS (version 9a) tsl2x7x driver change / bug fix.

Fixed - removed decimal multiplications.
        Added missing 'static' declarations
        Fixed _read_raw case logic to allow reading of _PROCESSED IIO_LIGHT
Replaced udelay with mdelay to accomodate eabi.

Signed-off-by: Jon Brenner <jbrenner@taosinc.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: iio: add TAOS tsl2x7x driver
Jon Brenner [Tue, 24 Apr 2012 16:56:49 +0000 (11:56 -0500)]
staging: iio: add TAOS tsl2x7x driver

TAOS device driver (version 9) for the tsl/tmd 2771 and 2772 device families (inc. all variants).

Update:
Removed bonus lines.

Signed-off-by: Jon Brenner <jbrenner@taosinc.com>
Acked-by: Jonathan Cameron<jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: resolve section mismatch in s626
Gerard Snitselaar [Tue, 24 Apr 2012 01:30:06 +0000 (18:30 -0700)]
staging: comedi: resolve section mismatch in s626

s626_attach is referencing s626_pci_table which is annotated
__devinitconst. Put pci vendor/device ids in the s626_board struct and
use s626_boards instead similar to what is done in gsc_hpdi.

v2: I had moved the PCI id defines to s626.h earlier, but later
decided to leave them in s626.c and forgot to move them up above where
they are being used in s626_boards.

Signed-off-by: Gerard Snitselaar <dev@snitselaar.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: refactor 8255 driver to remove forward declarations
H Hartley Sweeten [Mon, 23 Apr 2012 16:38:24 +0000 (09:38 -0700)]
staging: comedi: refactor 8255 driver to remove forward declarations

Move the module_init/module_exit routines and the associated
struct comedi_driver variable to the end of the source. This is
more typical of how other drivers are written and removes the
need for the forward declarations.

Also, move the do_config function to remove needing to have
a forward declaration for that routine.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: 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: refactor the acl7225b driver to remove the forward declarations
H Hartley Sweeten [Mon, 23 Apr 2012 21:50:39 +0000 (14:50 -0700)]
staging: comedi: refactor the acl7225b driver to remove the forward declarations

Move the module_init/module_exit routines and the associated
struct comedi_driver and struct boardtype variables to the end
of the source. This is more typical of how other drivers are
written and removes the need to the forward declarations.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: 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: refactor the adl_pci6208 driver to remove the forward declarations
H Hartley Sweeten [Mon, 23 Apr 2012 22:06:21 +0000 (15:06 -0700)]
staging: comedi: refactor the adl_pci6208 driver to remove the forward declarations

Move the module_init/module_exit routines and variables to the
end of the source as is more typically done with other drivers.
Then rearrange the attach/detach and probe/remove functions,
this removes the need for all the forward declarations.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: 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: refactor adl_pci7230 driver to remove forward declarations
H Hartley Sweeten [Mon, 23 Apr 2012 22:16:23 +0000 (15:16 -0700)]
staging: comedi: refactor adl_pci7230 driver to remove forward declarations

Move the struct comedi_driver variable and the associated
attach/detach routines 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: 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: refactor adl_pci7296 driver to remove forward declarations
H Hartley Sweeten [Mon, 23 Apr 2012 22:24:24 +0000 (15:24 -0700)]
staging: comedi: refactor adl_pci7296 driver to remove forward declarations

Move the struct comedi_driver variable and the associated
attach/detach routines 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: 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: refactor adl_pci7432 driver to remove forward declarations
H Hartley Sweeten [Mon, 23 Apr 2012 22:31:08 +0000 (15:31 -0700)]
staging: comedi: refactor adl_pci7432 driver to remove forward declarations

Move the struct comedi_driver variable and the associated
attach/detach routines 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: 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: refactor adl_pci8164 driver to remove forward declarations
H Hartley Sweeten [Mon, 23 Apr 2012 22:37:02 +0000 (15:37 -0700)]
staging: comedi: refactor adl_pci8164 driver to remove forward declarations

Move the struct comedi_driver variable and the associated
attach/detach routines 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: 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: refactor adl_pci9111 driver to remove forward declarations
H Hartley Sweeten [Mon, 23 Apr 2012 22:43:22 +0000 (15:43 -0700)]
staging: comedi: refactor adl_pci9111 driver to remove forward declarations

Move the module_init/module_exit routines and variables to the
end of the source as is more typically done with other drivers.
Then rearrange the attach/detach and probe/remove functions,
this removes the need for all the forward declarations.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: 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: refactor adq12b driver to remove forward declarations
H Hartley Sweeten [Mon, 23 Apr 2012 22:57:48 +0000 (15:57 -0700)]
staging: comedi: refactor adq12b driver to remove forward declarations

Move the module_init/module_exit routines and the associated
struct comedi_driver and struct boardtype variables to the end
of the source as is more typically done with other drivers. Then
rearrange the attach/detach functions, this removes the need
for all the forward declarations.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: 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: refactor adv_pci7123 driver to remove forward declarations
H Hartley Sweeten [Mon, 23 Apr 2012 23:06:14 +0000 (16:06 -0700)]
staging: comedi: refactor adv_pci7123 driver to remove forward declarations

Move the struct comedi_driver variable and the associated
attach/detach routines 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: 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: refactor aio_iiro_16 driver to remove forward declarations
H Hartley Sweeten [Mon, 23 Apr 2012 23:13:43 +0000 (16:13 -0700)]
staging: comedi: refactor aio_iiro_16 driver to remove forward declarations

Move the struct comedi_driver variable and the associated
attach/detach routines 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: 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: refactor c6xdigio driver to remove forward declarations
H Hartley Sweeten [Mon, 23 Apr 2012 23:20:41 +0000 (16:20 -0700)]
staging: comedi: refactor c6xdigio driver to remove forward declarations

Move the struct comedi_driver variable to remove the need
or the forward declarations.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Mori Hess <fmhess@users.sourceforge.net>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agodrivers/staging/comedi/comedi_fops.c: add missing vfree
Julia Lawall [Sun, 22 Apr 2012 11:37:09 +0000 (13:37 +0200)]
drivers/staging/comedi/comedi_fops.c: add missing vfree

aux_free is freed on all other exits from the function.  By removing the
return, we can benefit from the vfree already at the end of the function.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: vt6656: trivial whitespace cleanups to ioctl.c
Jesper Juhl [Sat, 21 Apr 2012 20:04:45 +0000 (22:04 +0200)]
staging: vt6656: trivial whitespace cleanups to ioctl.c

This removes a space between a cast and the variable and makes the
case statements in the switch stylewise consistent as to whether
there's a blank line before each 'case' or not.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: vt6656: Remove redundant casts from ioctl.c
Jesper Juhl [Sat, 21 Apr 2012 20:04:30 +0000 (22:04 +0200)]
staging: vt6656: Remove redundant casts from ioctl.c

Remove some unneeded explicit casts from
drivers/staging/vt6656/ioctl.c

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: olpc_dcon.c: Remove a few spaces between casts and variables
Jesper Juhl [Sat, 21 Apr 2012 18:33:15 +0000 (20:33 +0200)]
staging: olpc_dcon.c: Remove a few spaces between casts and variables

Just a trivial style cleanup.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Acked-by: Andres Salomon <dilinger@queued.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: olpc_dcon.c: Add missing level to a printk()
Jesper Juhl [Sat, 21 Apr 2012 18:33:07 +0000 (20:33 +0200)]
staging: olpc_dcon.c: Add missing level to a printk()

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Acked-by: Andres Salomon <dilinger@queued.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: olpc_dcon.c: strings printed with printk() put on a single line
Jesper Juhl [Sat, 21 Apr 2012 18:32:52 +0000 (20:32 +0200)]
staging: olpc_dcon.c: strings printed with printk() put on a single line

Quoted strings that were broken over multiple lines are put on a
single line for easier grep'ability.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Acked-by: Andres Salomon <dilinger@queued.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: wlan-ng: Release struct returned by cfg80211_inform_bss to avoid potential...
Krzysztof Wilczynski [Tue, 24 Apr 2012 14:00:34 +0000 (15:00 +0100)]
staging: wlan-ng: Release struct returned by cfg80211_inform_bss to avoid potential memory leak.

Function cfg80211_inform_bss returns a pointer to a referenced struct cfg80211_bss
but no information is needed from this struct in function prism2_scan and therefore
we release it by calling cfg80211_put_bss.

Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agodrivers/staging/rtl8192u/ieee80211/ieee80211_module.c: add missing free_netdev
Julia Lawall [Sun, 22 Apr 2012 12:02:13 +0000 (14:02 +0200)]
drivers/staging/rtl8192u/ieee80211/ieee80211_module.c: add missing free_netdev

Free dev on failure as done elsewhere in the function.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging, sep: Fix typo in sep
Masanari Iida [Sun, 22 Apr 2012 16:47:45 +0000 (01:47 +0900)]
staging, sep: Fix typo in sep

Correct spelling typos in staging/sep.

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: rtl8192e: Fix typos.
Justin P. Mattock [Mon, 23 Apr 2012 14:36:52 +0000 (07:36 -0700)]
staging: rtl8192e: Fix typos.

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
ACKed-by: Larry Finger <Larry.finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging:iio: pull out demux cleanup for a particular buffer.
Jonathan Cameron [Sat, 21 Apr 2012 09:09:45 +0000 (10:09 +0100)]
staging:iio: pull out demux cleanup for a particular buffer.

This will come in handy again when we move to multiple buffers
so lets pull it out into a little utility function now.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging:iio: Add caching of scan_timestamp to the core as well as buffers.
Jonathan Cameron [Sat, 21 Apr 2012 09:09:44 +0000 (10:09 +0100)]
staging:iio: Add caching of scan_timestamp to the core as well as buffers.

This will be needed when multiple buffer support is added.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging:iio:impedance-analyser make use of iio_sw_buffer_preenable
Jonathan Cameron [Sat, 21 Apr 2012 09:09:43 +0000 (10:09 +0100)]
staging:iio:impedance-analyser make use of iio_sw_buffer_preenable

This avoids some code duplication by using the generic form
in a non performance critical place.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging:iio:meter:ad7758 use iio_sw_buffer_preenable to avoid code repition
Jonathan Cameron [Sat, 21 Apr 2012 09:09:42 +0000 (10:09 +0100)]
staging:iio:meter:ad7758 use iio_sw_buffer_preenable to avoid code repition

Using this generic function adds a little overhead to a slow path but
reduces the amount of code repitition in exchange.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging:iio:adc:ad799x use iio_sw_buffer_preenable to avoid code repitiion
Jonathan Cameron [Sat, 21 Apr 2012 09:09:41 +0000 (10:09 +0100)]
staging:iio:adc:ad799x use iio_sw_buffer_preenable to avoid code repitiion

Using this generic function cuts down on repeated code at the cost of
a little overhead in a slow path.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging:iio:adc:ad7887 make use of iio_sw_buffer_preenable.
Jonathan Cameron [Sat, 21 Apr 2012 09:09:40 +0000 (10:09 +0100)]
staging:iio:adc:ad7887 make use of iio_sw_buffer_preenable.

Using this generic function cuts down on repeated code at the cost
of some computation in a slow path.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging:iio:adc:ad7793 use iio_sw_buffer_preenable to avoid repitition.
Jonathan Cameron [Sat, 21 Apr 2012 09:09:39 +0000 (10:09 +0100)]
staging:iio:adc:ad7793 use iio_sw_buffer_preenable to avoid repitition.

Now the generic function caches the scan size a lot of what was here
was redundant and is removed.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging:iio:adc:ad7476 use iio_sw_buffer_preenable instead of local version.
Jonathan Cameron [Sat, 21 Apr 2012 09:09:38 +0000 (10:09 +0100)]
staging:iio:adc:ad7476 use iio_sw_buffer_preenable instead of local version.

Now the generic version caches the scan size the version in this driver
is redundant.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging:iio:adc:ad7298 use iio_sw_buffer_preenable to avoid code repitition.
Jonathan Cameron [Sat, 21 Apr 2012 09:09:37 +0000 (10:09 +0100)]
staging:iio:adc:ad7298 use iio_sw_buffer_preenable to avoid code repitition.

Here some addition elements are needed, but this generic function cuts
down on the amount of code.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging:iio:adc:ad7192 make use of iio_sw_buffer_preenable.
Jonathan Cameron [Sat, 21 Apr 2012 09:09:36 +0000 (10:09 +0100)]
staging:iio:adc:ad7192 make use of iio_sw_buffer_preenable.

This is not a fast path, so although the original code was more consise
use the generic case to cut down on code repitition.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging:iio: add caching of the number of bytes in a scan.
Jonathan Cameron [Sat, 21 Apr 2012 09:09:35 +0000 (10:09 +0100)]
staging:iio: add caching of the number of bytes in a scan.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging:iio: scan_index_timestamp move to iio_dev from buffer
Jonathan Cameron [Sat, 21 Apr 2012 09:09:34 +0000 (10:09 +0100)]
staging:iio: scan_index_timestamp move to iio_dev from buffer

This is just a locally cached value that is device specific (rather
than buffer specific.) Hence it wants to come out of the buffer before
we add multiple buffer support.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging:iio:buffer: pull computation of scan length into a utility function.
Jonathan Cameron [Sat, 21 Apr 2012 09:09:33 +0000 (10:09 +0100)]
staging:iio:buffer: pull computation of scan length into a utility function.

Principal reason is to make later patches more coherent and easier to review
but this set in itself separates a logical entity out nicely wihin the code.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging:iio:buffer trivial use of strtobool to remove dodgy equivalent.
Jonathan Cameron [Sat, 21 Apr 2012 09:09:32 +0000 (10:09 +0100)]
staging:iio:buffer trivial use of strtobool to remove dodgy equivalent.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoiio: Add device tree support to LPC32xx ADC
Roland Stigge [Sat, 21 Apr 2012 08:10:16 +0000 (10:10 +0200)]
iio: Add device tree support to LPC32xx ADC

This patch adds device tree support to the LPC32xx's ADC.

Signed-off-by: Roland Stigge <stigge@antcom.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: iio: light: isl29018: use regmap for register access
Laxman Dewangan [Fri, 20 Apr 2012 07:27:38 +0000 (12:57 +0530)]
staging: iio: light: isl29018: use regmap for register access

Using regmap for accessing register through i2c bus. This will
remove the code for caching registers, read-modify-write logics.
Also it will provide the debugfs feature to dump register
through regmap debugfs.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Grant Grundler <grundler@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: iio: light: of: Fix vendor prefix of isl29018/isl29028
Laxman Dewangan [Tue, 24 Apr 2012 06:11:38 +0000 (11:41 +0530)]
staging: iio: light: of: Fix vendor prefix of isl29018/isl29028

ISL29018/ISL29028 is from Intersil Corporation and making the
vendor prefix for this part as "isil" for OF compatibity.

Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: android: binder: fix sparse warnings
Emil Goode [Mon, 23 Apr 2012 22:36:29 +0000 (00:36 +0200)]
staging: android: binder: fix sparse warnings

Fix sparse warnings by adding __user annotation to stucts.

This patch fixes the the following sparse warnings:

drivers/staging/android/binder.c:1343:76: warning:
incorrect type in argument 2 (different address spaces)
drivers/staging/android/binder.c:1343:76:
expected void [noderef] <asn:1>*ptr
drivers/staging/android/binder.c:1343:76: got void *binder
drivers/staging/android/binder.c:1567:57: warning:
incorrect type in argument 2 (different address spaces)
drivers/staging/android/binder.c:1567:57:
expected void const [noderef] <asn:1>*from
drivers/staging/android/binder.c:1567:57:
got void const *buffer
drivers/staging/android/binder.c:1573:46: warning:
incorrect type in argument 2 (different address spaces)
drivers/staging/android/binder.c:1573:46:
expected void const [noderef] <asn:1>*from
drivers/staging/android/binder.c:1573:46:
got void const *offsets
drivers/staging/android/binder.c:1603:76: warning:
incorrect type in argument 2 (different address spaces)
drivers/staging/android/binder.c:1603:76:
expected void [noderef] <asn:1>*ptr
drivers/staging/android/binder.c:1603:76: got void *binder
drivers/staging/android/binder.c:1605:64: warning:
incorrect type in argument 2 (different address spaces)
drivers/staging/android/binder.c:1605:64:
expected void [noderef] <asn:1>*ptr
drivers/staging/android/binder.c:1605:64: got void *binder
drivers/staging/android/binder.c:1605:76: warning:
incorrect type in argument 3 (different address spaces)
drivers/staging/android/binder.c:1605:76:
expected void [noderef] <asn:1>*cookie
drivers/staging/android/binder.c:1605:76: got void *cookie
drivers/staging/android/binder.c:1613:40: error:
incompatible types in comparison

Signed-off-by: Emil Goode <emilgoode@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: android-alarm: Switch from wakelocks to wakeup sources
John Stultz [Tue, 24 Apr 2012 17:57:16 +0000 (10:57 -0700)]
staging: android-alarm: Switch from wakelocks to wakeup sources

In their current AOSP tree, the Android in-kernel wakelock
infrastructure has been reimplemented in terms of wakeup
sources:
http://git.linaro.org/gitweb?p=people/jstultz/android.git;a=commitdiff;h=e9911f4efdc55af703b8b3bb8c839e6f5dd173bb

The Android alarm driver currently has stubbed out calls
to wakelock functionality. So this patch simply converts
the stubbed out wakelock calls to wakeup source calls, and
removes the empty wakelock macros

Greg, would you mind queuing this in staging-next?

CC: Colin Cross <ccross@android.com>
CC: Arve Hjønnevåg <arve@android.com>
CC: Greg KH <gregkh@linuxfoundation.org>
CC: Android Kernel Team <kernel-team@android.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: serqt_usb2: remove err() usage
Greg Kroah-Hartman [Tue, 24 Apr 2012 16:05:21 +0000 (09:05 -0700)]
Staging: serqt_usb2: remove err() usage

err() was a very old USB-specific macro that I thought had
gone away.  This patch removes it from being used in the
driver and uses dev_err() instead.

Cc: Bill Pemberton <wfp5p@virginia.edu>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: quatech_usb3: remove err() usage
Greg Kroah-Hartman [Tue, 24 Apr 2012 16:04:42 +0000 (09:04 -0700)]
Staging: quatech_usb3: remove err() usage

err() was a very old USB-specific macro that I thought had
gone away.  This patch removes it from being used in the
driver and uses dev_err() instead

Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
Cc: Kautuk Consul <consul.kautuk@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: media: lirc: lirc_ttusbir: remove err() usage
Greg Kroah-Hartman [Tue, 24 Apr 2012 16:03:48 +0000 (09:03 -0700)]
Staging: media: lirc: lirc_ttusbir: remove err() usage

err() was a very old USB-specific macro that I thought had
gone away.  This patch removes it from being used in the
driver and uses dev_err() instead

Cc: Jarod Wilson <jarod@wilsonet.com>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: media: lirc: lirc_sasem: remove err() usage
Greg Kroah-Hartman [Tue, 24 Apr 2012 00:27:48 +0000 (17:27 -0700)]
Staging: media: lirc: lirc_sasem: remove err() usage

err() was a very old USB-specific macro that I thought had
gone away.  This patch removes it from being used in the
driver and uses dev_err() instead

Cc: Jarod Wilson <jarod@wilsonet.com>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: Andrew Miller <amiller@amilx.com>
Cc: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: media: lirc: lirc_imon: remove err() usage
Greg Kroah-Hartman [Tue, 24 Apr 2012 00:14:54 +0000 (17:14 -0700)]
Staging: media: lirc: lirc_imon: remove err() usage

err() was a very old USB-specific macro that I thought had
gone away.  This patch removes it from being used in the
driver and uses dev_err() instead.

Cc: Jarod Wilson <jarod@wilsonet.com>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: media: easycap: remove err() usage
Greg Kroah-Hartman [Tue, 24 Apr 2012 00:13:54 +0000 (17:13 -0700)]
Staging: media: easycap: remove err() usage

err() was a very old USB-specific macro that I thought had
gone away.  This patch removes it from being used in the
driver and uses dev_err() instead.

Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: Tomas Winkler <tomas.winkler@intel.com>
Cc: Jesper Juhl <jj@chaosbits.net>
Cc: Ezequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: dt9812.c: remove err() usage
Greg Kroah-Hartman [Fri, 20 Apr 2012 23:53:19 +0000 (16:53 -0700)]
staging: comedi: dt9812.c: remove err() usage

err() was a very old USB-specific macro that I thought had
gone away.  This patch removes it from being used in the
driver and uses dev_err() instead.

CC: Ian Abbott <abbotti@mev.co.uk>
CC: Mori Hess <fmhess@users.sourceforge.net>
CC: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: vmk80xx.c: remove err() usage
Greg Kroah-Hartman [Fri, 20 Apr 2012 23:53:22 +0000 (16:53 -0700)]
staging: comedi: vmk80xx.c: remove err() usage

err() was a very old USB-specific macro that I thought had
gone away.  This patch removes it from being used in the
driver and uses dev_err() instead.

CC: Ian Abbott <abbotti@mev.co.uk>
CC: Mori Hess <fmhess@users.sourceforge.net>
CC: "J. Ali Harlow" <ali@avrc.city.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: frontier: alphatrack.c: remove err() usage
Greg Kroah-Hartman [Fri, 20 Apr 2012 23:53:24 +0000 (16:53 -0700)]
staging: frontier: alphatrack.c: remove err() usage

err() was a very old USB-specific macro that I thought had
gone away.  This patch removes it from being used in the
driver and uses dev_err() instead.

CC: "David Täht" <d@teklibre.com>
CC: Hitoshi Nakamori <hitoshi.nakamori@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: frontier: tranzport.c: remove err() usage
Greg Kroah-Hartman [Fri, 20 Apr 2012 23:53:27 +0000 (16:53 -0700)]
staging: frontier: tranzport.c: remove err() usage

err() was a very old USB-specific macro that I thought had
gone away.  This patch removes it from being used in the
driver and uses dev_err() instead.

CC: "David Täht" <d@teklibre.com>
CC: Hitoshi Nakamori <hitoshi.nakamori@gmail.com>
CC: "Ken O'Brien" <kernel@kenobrien.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: line6: toneport.c: remove err() usage
Greg Kroah-Hartman [Fri, 20 Apr 2012 23:53:32 +0000 (16:53 -0700)]
staging: line6: toneport.c: remove err() usage

err() was a very old USB-specific macro that I thought had
gone away.  This patch removes it from being used in the
driver and uses dev_err() instead.

CC: Markus Grabner <grabner@icg.tugraz.at>
CC: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: asus_oled.c: remove err() usage
Greg Kroah-Hartman [Fri, 20 Apr 2012 23:53:17 +0000 (16:53 -0700)]
staging: asus_oled.c: remove err() usage

err() was a very old USB-specific macro that I thought had
gone away.  This patch removes it from being used in the
driver and uses dev_err() instead.

CC: Jakub Schmidtke <sjakub@gmail.com>
CC: Pekka Paalanen <pq@iki.fi>
CC: Peter Huewe <peterhuewe@gmx.de>
CC: "Ken O'Brien" <kernel@kenobrien.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: media: go7007: use module_usb_driver()
Greg Kroah-Hartman [Mon, 23 Apr 2012 23:33:52 +0000 (16:33 -0700)]
Staging: media: go7007: use module_usb_driver()

There is no need to initialize a static array to NULL at startup, so we
can use the module_usb_driver() call for the go7007 module.

Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: line6: use module_usb_driver()
Greg Kroah-Hartman [Mon, 23 Apr 2012 23:13:19 +0000 (16:13 -0700)]
Staging: line6: use module_usb_driver()

Now that our module_init/exit path is just registering and unregistering
the usb driver, we can use module_usb_driver() instead.  This also has
the nice side affect of removing the unneeded printk for the module
version number.

CC: Markus Grabner <grabner@icg.tugraz.at>
CC: Stefan Hajnoczi <stefanha@gmail.com>
CC: Julia Lawall <julia@diku.dk>
CC: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: line6: remove teardown code from module_exit path
Greg Kroah-Hartman [Mon, 23 Apr 2012 23:11:26 +0000 (16:11 -0700)]
Staging: line6: remove teardown code from module_exit path

These pcm values should all be stopped properly when the device is
removed from the system (i.e. when disconnect is called), so there's no
need to duplicate this when the module is unloaded as well.

CC: Markus Grabner <grabner@icg.tugraz.at>
CC: Stefan Hajnoczi <stefanha@gmail.com>
CC: Julia Lawall <julia@diku.dk>
CC: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: line6: only allocate a buffer if it is needed
Greg Kroah-Hartman [Mon, 23 Apr 2012 23:09:56 +0000 (16:09 -0700)]
Staging: line6: only allocate a buffer if it is needed

Only allocate the version request buffer if it is needed, not when the
module starts up.  This will let us make the module_init path much
smaller.

CC: Markus Grabner <grabner@icg.tugraz.at>
CC: Stefan Hajnoczi <stefanha@gmail.com>
CC: Julia Lawall <julia@diku.dk>
CC: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: line6: remove unneeded initialization
Greg Kroah-Hartman [Mon, 23 Apr 2012 22:59:17 +0000 (15:59 -0700)]
Staging: line6: remove unneeded initialization

Static variables are initialized to NULL, no need to do it again in the
module_init function.

CC: Markus Grabner <grabner@icg.tugraz.at>
CC: Stefan Hajnoczi <stefanha@gmail.com>
CC: Julia Lawall <julia@diku.dk>
CC: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: use ARRAY_SIZE instead of custom n_boardtypes macros
H Hartley Sweeten [Fri, 20 Apr 2012 19:05:04 +0000 (12:05 -0700)]
staging: comedi: use ARRAY_SIZE instead of custom n_boardtypes macros

The n_boardtypes macros are simply open-coded versions of the kernels
ARRAY_SIZE macro. Use the kernel provided macro.

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: r8192e_pci: Change memcpy to memcmp
Larry Finger [Fri, 20 Apr 2012 19:45:37 +0000 (14:45 -0500)]
staging: r8192e_pci: Change memcpy to memcmp

Routine rtllib_MlmeDisassociateRequest() has a comparison of memcpy()
with NULL, which makes no sense. Analysis of the code suggests that
memcmp() was intended.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoandroid-alarm: Remove unused android alarm in-kernel interfaces
John Stultz [Fri, 20 Apr 2012 19:31:47 +0000 (12:31 -0700)]
android-alarm: Remove unused android alarm in-kernel interfaces

Now that alarm-dev.c uses the upstreamed alarmtimer interfaces,
we can remove the otherwise unused in-kernel android alarm api.

CC: Colin Cross <ccross@android.com>
CC: Thomas Gleixner <tglx@linutronix.de>
CC: Android Kernel Team <kernel-team@android.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: android-alarm: Rework alarm-dev.c to use upstreamed alarmtimers
John Stultz [Fri, 20 Apr 2012 19:31:46 +0000 (12:31 -0700)]
staging: android-alarm: Rework alarm-dev.c to use upstreamed alarmtimers

This reworks the alarm-dev.c to use the upstreamed alarmtimers
interface.

CC: Colin Cross <ccross@android.com>
CC: Thomas Gleixner <tglx@linutronix.de>
CC: Android Kernel Team <kernel-team@android.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoalarmtimer: Provide accessor to alarmtimer rtc device
John Stultz [Fri, 20 Apr 2012 19:31:45 +0000 (12:31 -0700)]
alarmtimer: Provide accessor to alarmtimer rtc device

The Android alarm interface provides a settime call that sets both
the alarmtimer RTC device and CLOCK_REALTIME to the same value.

Since there may be multiple rtc devices, provide a hook to access the
one the alarmtimer infrastructure is using.

CC: Colin Cross <ccross@android.com>
CC: Thomas Gleixner <tglx@linutronix.de>
CC: Android Kernel Team <kernel-team@android.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: android-alarm: Convert ALARM_ELAPSED_REALTIME to use CLOCK_BOOTTIME
John Stultz [Fri, 20 Apr 2012 19:31:44 +0000 (12:31 -0700)]
staging: android-alarm: Convert ALARM_ELAPSED_REALTIME to use CLOCK_BOOTTIME

The ALARM_ELAPSED_REALTIME clock domain in Android pointed
to the need for something similar in linux system-wide
(instead of limited to just the alarm interface).

Thus CLOCK_BOOTTIME was introduced into the upstream kernel
in 2.6.39.

This patch attempts to convert the android alarm timer to utilize
the kernel's CLOCK_BOOTTIME clockid for ALARM_ELAPSED_REALTIME,
instead of managing it itself.

CC: Colin Cross <ccross@android.com>
CC: Thomas Gleixner <tglx@linutronix.de>
CC: Android Kernel Team <kernel-team@android.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi vmk80xx: lock held on error path
Dan Carpenter [Fri, 20 Apr 2012 11:46:27 +0000 (14:46 +0300)]
staging: comedi vmk80xx: lock held on error path

If the user passes an invalid command, then we don't drop the lock
before returning.  The check for invalid commands doesn't need to be
done under lock so I moved it forward a couple lines.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agodrivers/staging/wlags49_h2/wl_pci.c: add missing wl_device_dealloc and wl_remove
Julia Lawall [Thu, 19 Apr 2012 11:03:58 +0000 (13:03 +0200)]
drivers/staging/wlags49_h2/wl_pci.c: add missing wl_device_dealloc and wl_remove

The need for wl_device_dealloc is motivated by the error-handling code for
the failure of wl_adapter_insert.  The need for wl_remove in the third case
is motivated by the code in the definition of wl_pci_remove.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>