openwrt/staging/blogic.git
11 years agoStaging: bcm: PHSModule.c: Matching the function definition with function declaration
Shalin Mehta [Tue, 17 Sep 2013 07:42:17 +0000 (00:42 -0700)]
Staging: bcm: PHSModule.c: Matching the function definition with function declaration

The function implementations of the PHSModule didn't match with the declaration. The functions are static
in the declaration but in the implemntation they are non-static

Signed-off-by: Shalin Mehta <shalinmehta85@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: vt6656: rxtx.c s_vGenerateTxParameter replace pTxBufHead void pointer.
Malcolm Priestley [Tue, 17 Sep 2013 18:58:11 +0000 (19:58 +0100)]
staging: vt6656: rxtx.c s_vGenerateTxParameter replace pTxBufHead void pointer.

with struct vnt_tx_buffer and attach vnt_tx_fifo_head to pTX_Buffer structure.

The the calling pbyTxBufferAddr points to the same address as
vnt_tx_buffer->fifo_head and is still in use.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: vt6656: desc.h remove typedef struct tagSTxBufHead to rxtx.h
Malcolm Priestley [Tue, 17 Sep 2013 18:54:35 +0000 (19:54 +0100)]
staging: vt6656: desc.h remove typedef struct tagSTxBufHead to rxtx.h

In code it is referred to as fifo to renamed to
typedef struct tagSTxBufHead -> struct vnt_tx_fifo_head

This is only needed by rxtc.c so moved to rxtx.h

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: rtl8192e: Fix typo in rtl8192e/dot11d.h
Masanari Iida [Mon, 16 Sep 2013 00:58:07 +0000 (09:58 +0900)]
staging: rtl8192e: Fix typo in rtl8192e/dot11d.h

Correct spelling typo in comment

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: vt6655: vt6656: Fix typo in comments
Masanari Iida [Sun, 15 Sep 2013 11:31:37 +0000 (20:31 +0900)]
staging: vt6655: vt6656: Fix typo in comments

Correct spelling typo in staging/vt6655 and staging/vt6656

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: octeon: Fix typo in staging/octeon
Masanari Iida [Mon, 16 Sep 2013 02:44:08 +0000 (11:44 +0900)]
staging: octeon: Fix typo in staging/octeon

Correct spelling typo in staging/octeon

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agodrivers: staging: netlogic.h: removed WARNING: extern prototypes should be avoided...
Avinash kumar [Fri, 20 Sep 2013 06:32:54 +0000 (12:02 +0530)]
drivers: staging: netlogic.h: removed WARNING: extern prototypes should be avoided in .h files

removed checpatch warning : WARNING: extern prototypes should be avoided in .h files

Signed-off-by: Avinash Kumar <avi.kp.137@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: lustre: fix switch case statement indenting
Jon Bernard [Tue, 17 Sep 2013 19:44:58 +0000 (15:44 -0400)]
Staging: lustre: fix switch case statement indenting

This is a patch to lvfs_linux.c that fixes incorrect switch case statement
indenting found by checkpatch.pl.

Signed-off-by: Jon Bernard <jbernard@tuxion.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: lustre: remove assignment in if conditions
Jon Bernard [Tue, 17 Sep 2013 01:27:55 +0000 (21:27 -0400)]
Staging: lustre: remove assignment in if conditions

This is a patch to lvfs_linux.c that removes the use of variable assignment
within an if condition found by checkpatch.pl.

Signed-off-by: Jon Bernard <jbernard@tuxion.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: lustre: Fix typo in lustre/llite
Masanari Iida [Sun, 15 Sep 2013 05:38:18 +0000 (14:38 +0900)]
staging: lustre: Fix typo in lustre/llite

Correct spelling typo in lustre/llite
Correct double words "to to"

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: lustre: Fix typo in lustre/libcfs
Masanari Iida [Sun, 15 Sep 2013 06:11:07 +0000 (15:11 +0900)]
staging: lustre: Fix typo in lustre/libcfs

Correct spelling typos in comment and debug message,
within  luster/libcfs

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: dgap: tty.c: removes smatch warnings "redundant null check"
Lidza Louina [Mon, 23 Sep 2013 22:47:15 +0000 (18:47 -0400)]
staging: dgap: tty.c: removes smatch warnings "redundant null check"

This patch removes these smatch warnings:
redundant null check on dgap_TmpWriteBuf calling kfree()
redundant null check on brd->SerialDriver->ttys calling kfree()
redundant null check on brd->PrintDriver->ttys calling kfree()

The code checked to see if these variables are null
before freeing. This check isn't needed.

Signed-off-by: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: dgap: tty.c: removes smatch warning "ignoring unreachable code"
Lidza Louina [Mon, 23 Sep 2013 22:47:14 +0000 (18:47 -0400)]
staging: dgap: tty.c: removes smatch warning "ignoring unreachable code"

This patch removes this smatch warning:
info: ignoring unreachable code.

There were instances where there was extra code after
the default action in switch statements. These default
actions ended with a break so the code wasn't being run
at anytime. This patch removes that extra code.

Signed-off-by: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: dgap: driver.c: removes smatch warning "redundant null check"
Lidza Louina [Mon, 23 Sep 2013 22:47:12 +0000 (18:47 -0400)]
staging: dgap: driver.c: removes smatch warning "redundant null check"

This patch removes these smatch warnings from dgap_driver.c:

redundant null check on dgap_config_buf calling kfree()
redundant null check on brd->flipbuf calling kfree()
redundant null check on brd->flipflagbuf calling kfree()

Signed-off-by: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agodrivers: staging: dgap: move DG_NAME and DG_PART from "Makefile" to "dgap_driver.h"
Chen Gang [Sat, 21 Sep 2013 12:38:30 +0000 (20:38 +0800)]
drivers: staging: dgap: move DG_NAME and DG_PART from "Makefile" to "dgap_driver.h"

Normally, the macros from command line are system specific macros (e.g
__linux, __KERNEL__ ...), and module own macros are usually defined in
their header files.

DG_NAME and DG_PART are driver 'dgap' owned macros which are used by
multiple files within driver, and need be defined in the driver main
header file.

So move DG_NAME and DG_PART to "dgap_driver.h", it not only can make
code clearer, but also can avoid compiling failure when EXTRA_CFLAGS
appended to make command line (e.g. "EXTRA_CFLAGS=-W").

Signed-off-by: Chen Gang <gang.chen@asianux.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: dgnc: removes LINUX_VERSION_CODE conditionals
Lidza Louina [Mon, 9 Sep 2013 19:01:26 +0000 (15:01 -0400)]
staging: dgnc: removes LINUX_VERSION_CODE conditionals

This patch removes the conditionals that make sure
the driver supports various versions of the kernel.
They aren't needed.

Signed-off-by: Lidza Louina <lidza.louina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: pcl711: change MODULE_DESCRIPTION
H Hartley Sweeten [Fri, 20 Sep 2013 23:45:22 +0000 (16:45 -0700)]
staging: comedi: pcl711: change MODULE_DESCRIPTION

Change the MODULE_DESCRIPTION to something useful instead of the
generic "Comedi low-level driver".

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: pcl711: reorder includes
H Hartley Sweeten [Fri, 20 Sep 2013 23:45:03 +0000 (16:45 -0700)]
staging: comedi: pcl711: reorder includes

For aesthetics, reorder the includes a bit.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: pcl711: tidy up multi line comments
H Hartley Sweeten [Fri, 20 Sep 2013 23:44:46 +0000 (16:44 -0700)]
staging: comedi: pcl711: tidy up multi line comments

Tidy up the multi line comments to follow the CodingStyle.

Remove the multi line comment about an alternate driver for the
PCL-711. The http address does not work and the driver history
in the comment is unnecessary.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: pcl711: rename some of the register map defines
H Hartley Sweeten [Fri, 20 Sep 2013 23:44:28 +0000 (16:44 -0700)]
staging: comedi: pcl711: rename some of the register map defines

Rename some of the register map defines so they all have the same
format. Add a couple new defines to tidy up some of the magic
numbers used with the registers.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: pcl711: no need to calc the timer values twice
H Hartley Sweeten [Fri, 20 Sep 2013 23:44:08 +0000 (16:44 -0700)]
staging: comedi: pcl711: no need to calc the timer values twice

The comedi core always calls the (*do_cmdtest) function to validate
a command before it calls the (*do_cmd) function.

Since the (*do_cmdtest) has already calculated the timer values in
order to validate the cmd->scan_begin_arg there is no reason to
recalc the values in the (*do_cmd).

This also fixes a bug in the driver. The (*do_cmdtest) was using a
time base value of 100 and but the (*do_cmd) was using a time base
of 500. These result in different timer values. The functions used
to calculate the values are actually the same due to a #define in
the 8253.h header.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: pcl711: remove 'i8253_osc_base'
H Hartley Sweeten [Fri, 20 Sep 2013 23:43:47 +0000 (16:43 -0700)]
staging: comedi: pcl711: remove 'i8253_osc_base'

This static const int variable is only used one place in the code.
Remove it and just open code the value.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: pcl711: use 8253.h helper to set the timers
H Hartley Sweeten [Fri, 20 Sep 2013 23:43:29 +0000 (16:43 -0700)]
staging: comedi: pcl711: use 8253.h helper to set the timers

To better document the code, use the i8254_load() helper to set the
timers instead of doing the outb() instructions.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: pcl711: remove unused private data members
H Hartley Sweeten [Fri, 20 Sep 2013 23:43:11 +0000 (16:43 -0700)]
staging: comedi: pcl711: remove unused private data members

Remove all the private data variables that are not used by the driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: pcl711: remove 'is_pcl711b' from boardinfo
H Hartley Sweeten [Fri, 20 Sep 2013 23:42:52 +0000 (16:42 -0700)]
staging: comedi: pcl711: remove 'is_pcl711b' from boardinfo

This member in the board info is used to indicate if the board is
a PCL711B. This board uses bits in the mode register to select the
IRQ used for interrupts. These bits do nothing on the other boards
supported by this driver.

Remove the 'is_pcl711b' variable from the boardinfo. Also, remove
the 'mode' variable from the private data and just calculate the
mode bits when needed.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: pcl711: remove 'is_8112' from boardinfo
H Hartley Sweeten [Fri, 20 Sep 2013 23:42:27 +0000 (16:42 -0700)]
staging: comedi: pcl711: remove 'is_8112' from boardinfo

This member in the boardinfo is redundant. All the 8112 style boards
have > 8 analog input channels (16 actually). We can use that information
instead and remove the extra boardinfo.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: pcl711: tidy up pcl711_ai_insn()
H Hartley Sweeten [Fri, 20 Sep 2013 23:41:57 +0000 (16:41 -0700)]
staging: comedi: pcl711: tidy up pcl711_ai_insn()

For aesthetic reasons, rename this function to help with greps.

Tidy up the function a bit to follow the comedi driver norm.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: pcl711: fix software trigger for board->is_8112
H Hartley Sweeten [Fri, 20 Sep 2013 23:41:39 +0000 (16:41 -0700)]
staging: comedi: pcl711: fix software trigger for board->is_8112

The acl-8112 boards also need to write a value to the software
trigger register in order to start an A/D conversion. Remove the
if (!board->is_8112) test so that the write is always done.

Also, the analog input mode does not need to be set each time for
multiple samples. Move the pcl711_ai_set_mode() out of the for loop.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: pcl711: remove unnecessary test of 'board->is_8112'
H Hartley Sweeten [Fri, 20 Sep 2013 23:41:09 +0000 (16:41 -0700)]
staging: comedi: pcl711: remove unnecessary test of 'board->is_8112'

At the end of an asynchronous command, the analog input is returned
to software triggered mode. For the non-8112 style boards the mode
PCL711_MODE_DEFAULT and PCL711_MODE_SOFTTRIG are identical. Just set
the mode to PCL711_MODE_SOFTTRIG and remove the test.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: pcl711: define the mode register magic numbers
H Hartley Sweeten [Fri, 20 Sep 2013 23:40:44 +0000 (16:40 -0700)]
staging: comedi: pcl711: define the mode register magic numbers

Define the magic numbers used with the mode register.

For the PCL711B board, the mode register also contains the irq number
that is being used. Introduce a helper function to write to the mode
register so that this irq number is always included when needed.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: pcl711: add differential input support for 8112 boards
H Hartley Sweeten [Fri, 20 Sep 2013 23:40:23 +0000 (16:40 -0700)]
staging: comedi: pcl711: add differential input support for 8112 boards

The ACL-8112 boards can do differential analog inputs. Add support for
this mode.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: pcl711: fix pcl711_set_changain()
H Hartley Sweeten [Fri, 20 Sep 2013 23:40:01 +0000 (16:40 -0700)]
staging: comedi: pcl711: fix pcl711_set_changain()

Currently the board->is_8112 handling in this function does not write
the value to the mux register. Also, the value for channels >= 8 is
calculated incorrectly.

Define the magic numbers used with the mux register and fix the function
so 8112 boards work correctly.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: pcl711: factor out the ai end-of-conversion wait
H Hartley Sweeten [Fri, 20 Sep 2013 23:39:34 +0000 (16:39 -0700)]
staging: comedi: pcl711: factor out the ai end-of-conversion wait

Factor out the analog input end-of-conversion wait to clarify the
pcl711_ai_insn() function a bit.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: pcl711: use dev->read_subdev in interrupt handler
H Hartley Sweeten [Fri, 20 Sep 2013 23:39:15 +0000 (16:39 -0700)]
staging: comedi: pcl711: use dev->read_subdev in interrupt handler

The comedi_subdevice used in the interrupt handler is the dev->read_subdev
that was initialized during the attach of the board. Use that instead of
accessing the dev->subdevices array directly.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: pcl711: introduce pcl711_ai_get_sample()
H Hartley Sweeten [Fri, 20 Sep 2013 23:38:52 +0000 (16:38 -0700)]
staging: comedi: pcl711: introduce pcl711_ai_get_sample()

Introduce a helper function to read the analog input data from the
hardware.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: pcl711: tidy up pcl711_ao_insn_read()
H Hartley Sweeten [Fri, 20 Sep 2013 23:38:29 +0000 (16:38 -0700)]
staging: comedi: pcl711: tidy up pcl711_ao_insn_read()

Tidy up this function to follow the normal form in comedi drivers.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: pcl711: tidy up pcl711_ao_insn()
H Hartley Sweeten [Fri, 20 Sep 2013 23:38:09 +0000 (16:38 -0700)]
staging: comedi: pcl711: tidy up pcl711_ao_insn()

For aesthetics, rename this function to help with greps.

Introduce a helper function to write the values to the analog
output channel registers. Modify the defines for the D/A registers
to avoid the ? : tests based on the chan number.

Only the final value written needs to be saved for read back.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: pcl711: tidy up the register map defines
H Hartley Sweeten [Fri, 20 Sep 2013 23:37:30 +0000 (16:37 -0700)]
staging: comedi: pcl711: tidy up the register map defines

Add some whitespace to the register map defines to make the code
easier to read.

For aesthetics, convert all the values to hex. This is more common
in comedi drivers.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: pcl711: save the irq for the pcl711b only when used
H Hartley Sweeten [Fri, 20 Sep 2013 23:37:05 +0000 (16:37 -0700)]
staging: comedi: pcl711: save the irq for the pcl711b only when used

Move the storing of the irq in the mode register for the pcl711b board
so it's only done when the irq is actually used by the driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: pcl711: tidy up the subdevice init
H Hartley Sweeten [Fri, 20 Sep 2013 23:36:44 +0000 (16:36 -0700)]
staging: comedi: pcl711: tidy up the subdevice init

For aesthetic reasons, add some whitespace to the subdevice init.

The 's->len_chanlist' is only used with asynchronous command support.
Remove the unnecessary initialization of this member in the subdevices
that do not support commands. For the analog input subdevice, move
the initialization so it only occurs when commands are supported.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: pcl711: remove PCL711_SIZE
H Hartley Sweeten [Fri, 20 Sep 2013 23:36:17 +0000 (16:36 -0700)]
staging: comedi: pcl711: remove PCL711_SIZE

This define is only used in the comedi_request_region() call. It doesn't
really add any clarity to the code so remove it and just open code the
value.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: pcl711: don't fail attach if irq is unavailable
H Hartley Sweeten [Fri, 20 Sep 2013 23:35:52 +0000 (16:35 -0700)]
staging: comedi: pcl711: don't fail attach if irq is unavailable

Interrupts are only needed to support asynchronous commands with the
analog input subdevice. Since the interrupt is optional during the
attach of the board, don't fail the attach if it's not available.

Also, remove the printk() noise about the irq. The user will know if
the interrupt is available due to the subdev_flag SDF_CMD_READ being
set for the analog input subdevice.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: pcl711: tidy up the comedi_lrange tables
H Hartley Sweeten [Fri, 20 Sep 2013 23:35:20 +0000 (16:35 -0700)]
staging: comedi: pcl711: tidy up the comedi_lrange tables

For aesthetic reasons, cleanup the whitespace in the comedi_lrange
tables.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: pcl711: convert boardinfo flags to bit-fields
H Hartley Sweeten [Fri, 20 Sep 2013 23:34:58 +0000 (16:34 -0700)]
staging: comedi: pcl711: convert boardinfo flags to bit-fields

To save a bit of space, convert the 'is_pcl711b' and 'is_8112' flags
in the boardinfo to bit-fields.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: pcl711: remove unused boardinfo
H Hartley Sweeten [Fri, 20 Sep 2013 23:34:36 +0000 (16:34 -0700)]
staging: comedi: pcl711: remove unused boardinfo

The 'is_dg' and 'n_ranges' members in the boardinfo are not used by
the driver. Remove them.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: pcl711: remove all '= 0' boardinfo
H Hartley Sweeten [Fri, 20 Sep 2013 23:34:14 +0000 (16:34 -0700)]
staging: comedi: pcl711: remove all '= 0' boardinfo

Remove all the '= 0' entries in the boardinfo. They will default to 0.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: pcl711: convert boardinfo declaration to C99 format
H Hartley Sweeten [Fri, 20 Sep 2013 23:33:51 +0000 (16:33 -0700)]
staging: comedi: pcl711: convert boardinfo declaration to C99 format

Convert the boardinfo declaration to C99 format to make it less error
prone and easier to maintain.

For aesthetics, move the declaration closer to the struct definition.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: adl_pci6208: change MODULE_DESCRIPTION
H Hartley Sweeten [Wed, 18 Sep 2013 18:51:56 +0000 (11:51 -0700)]
staging: comedi: adl_pci6208: change MODULE_DESCRIPTION

Change the MODULE_DESCRIPTION to something useful instead of the
generic "Comedi low-level driver".

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: adl_pci6208: tidy up multi-line comments
H Hartley Sweeten [Wed, 18 Sep 2013 18:51:34 +0000 (11:51 -0700)]
staging: comedi: adl_pci6208: tidy up multi-line comments

Tidy up the multi-line comments to follow the CodingStyle.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: adl_pci6208: remove board attach noise
H Hartley Sweeten [Wed, 18 Sep 2013 18:51:14 +0000 (11:51 -0700)]
staging: comedi: adl_pci6208: remove board attach noise

Remove the final dev_info() at the end of the board attach. This is
just added noise.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: adl_pci6208: tidy up pci6208_ao_rinsn()
H Hartley Sweeten [Wed, 18 Sep 2013 18:50:54 +0000 (11:50 -0700)]
staging: comedi: adl_pci6208: tidy up pci6208_ao_rinsn()

For aesthetics, rename this function to help with greps,

Change the type of 'chan' to match the type of the insn->chanspec
that it is derived from using the CR_CHAN macro.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: adl_pci6208: tidy up pci6208_ao_winsn()
H Hartley Sweeten [Wed, 18 Sep 2013 18:50:35 +0000 (11:50 -0700)]
staging: comedi: adl_pci6208: tidy up pci6208_ao_winsn()

For aesthetics, rename this function to help with greps,

Change the type of 'chan' to match the type of the insn->chanspec
that it is derived from using the CR_CHAN macro.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: adl_pci6208: use comedi_offset_munge()
H Hartley Sweeten [Wed, 18 Sep 2013 18:50:05 +0000 (11:50 -0700)]
staging: comedi: adl_pci6208: use comedi_offset_munge()

Use comedi_offset_munge() to munge the offset binary values from the
comedi core into the two's complement form that the hardware expects.

This removes the hard coded assumption that the analog outputs are
16-bits and instead does the munging based on the s->maxdata.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: core: introduce comedi_offset_munge()
H Hartley Sweeten [Wed, 18 Sep 2013 18:49:33 +0000 (11:49 -0700)]
staging: comedi: core: introduce comedi_offset_munge()

The comedi core expects the data to/from analog subdevices to be
in offset binary coding. This means that a value of '0' represents
the most negative and a value of 's->maxdata' the most positive
signal of the analog subdevice.

Many comedi drivers require the data written to the analog outputs,
or returned from the analog inputs, be in two's complement format.

Introduce a helper function to munge the data for analog subdevices.
This function simply inverts the sign bit and masks the result by
's->maxdata' to keep the result in range for the subdevice. The
strange:

  return val ^ s->maxdata ^ (s->maxdata >> 1);

is equivalent to:

  return (val ^ ((s->maxdata + 1) >> 1) & s->maxdata;

as long as s->maxdata is a value of the form (1 << n) - 1. This
avoids the 32-bit unsigned overflow for a s->maxdata of 0xffffffff.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: adl_pci6208: don't deadlock while waiting to write ao data
H Hartley Sweeten [Wed, 18 Sep 2013 18:48:41 +0000 (11:48 -0700)]
staging: comedi: adl_pci6208: don't deadlock while waiting to write ao data

Remove a possible deadlock while waiting to write the analog output data.

The data transfer rate for every D/A data write in this driver is 2.2us.
Wait up to 10us for the board to be ready then and return -ETIME.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: adl_pci6208: save raw data for analog output readback
H Hartley Sweeten [Wed, 18 Sep 2013 18:47:26 +0000 (11:47 -0700)]
staging: comedi: adl_pci6208: save raw data for analog output readback

This driver munges the raw data from the comedi core into its two's
complement form before writing it to the hardware. The last value
written to the hardware is saved in the private data for readback.

Since the comedi core always expects the data to be in offset binary
coding, make sure to save the un-munged value for readback.

Also, prefetch the current readback value before attempting to update
the hardware. This ensures that the readback value is correct if no
values are actually written.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoMerge 3.12-rc2 into staging-next.
Greg Kroah-Hartman [Wed, 25 Sep 2013 15:59:04 +0000 (08:59 -0700)]
Merge 3.12-rc2 into staging-next.

This resolves the merge problem with two iio drivers that Stephen
Rothwell pointed out.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoLinux 3.12-rc2
Linus Torvalds [Mon, 23 Sep 2013 22:41:09 +0000 (15:41 -0700)]
Linux 3.12-rc2

11 years agoMerge tag 'staging-3.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
Linus Torvalds [Mon, 23 Sep 2013 19:53:07 +0000 (12:53 -0700)]
Merge tag 'staging-3.12-rc2' of git://git./linux/kernel/git/gregkh/staging

Pull staging fixes from Greg KH:
 "Here are a number of small staging tree and iio driver fixes.  Nothing
  major, just lots of little things"

* tag 'staging-3.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (34 commits)
  iio:buffer_cb: Add missing iio_buffer_init()
  iio: Prevent race between IIO chardev opening and IIO device free
  iio: fix: Keep a reference to the IIO device for open file descriptors
  iio: Stop sampling when the device is removed
  iio: Fix crash when scan_bytes is computed with active_scan_mask == NULL
  iio: Fix mcp4725 dev-to-indio_dev conversion in suspend/resume
  iio: Fix bma180 dev-to-indio_dev conversion in suspend/resume
  iio: Fix tmp006 dev-to-indio_dev conversion in suspend/resume
  iio: iio_device_add_event_sysfs() bugfix
  staging: iio: ade7854-spi: Fix return value
  staging:iio:hmc5843: Fix measurement conversion
  iio: isl29018: Fix uninitialized value
  staging:iio:dummy fix kfifo_buf kconfig dependency issue if kfifo modular and buffer enabled for built in dummy driver.
  iio: at91: fix adc_clk overflow
  staging: line6: add bounds check in snd_toneport_source_put()
  Staging: comedi: Fix dependencies for drivers misclassified as PCI
  staging: r8188eu: Adjust RX gain
  staging: r8188eu: Fix smatch warning in core/rtw_ieee80211.
  staging: r8188eu: Fix smatch error in core/rtw_mlme_ext.c
  staging: r8188eu: Fix Smatch off-by-one warning in hal/rtl8188e_hal_init.c
  ...

11 years agoMerge tag 'usb-3.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Linus Torvalds [Mon, 23 Sep 2013 19:52:35 +0000 (12:52 -0700)]
Merge tag 'usb-3.12-rc2' of git://git./linux/kernel/git/gregkh/usb

Pull USB fixes from Greg KH:
 "Here are a number of small USB fixes for 3.12-rc2.

  One is a revert of a EHCI change that isn't quite ready for 3.12.
  Others are minor things, gadget fixes, Kconfig fixes, and some quirks
  and documentation updates.

  All have been in linux-next for a bit"

* tag 'usb-3.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
  USB: pl2303: distinguish between original and cloned HX chips
  USB: Faraday fotg210: fix email addresses
  USB: fix typo in usb serial simple driver Kconfig
  Revert "USB: EHCI: support running URB giveback in tasklet context"
  usb: s3c-hsotg: do not disconnect gadget when receiving ErlySusp intr
  usb: s3c-hsotg: fix unregistration function
  usb: gadget: f_mass_storage: reset endpoint driver data when disabled
  usb: host: fsl-mph-dr-of: Staticize local symbols
  usb: gadget: f_eem: Staticize eem_alloc
  usb: gadget: f_ecm: Staticize ecm_alloc
  usb: phy: omap-usb3: Fix return value
  usb: dwc3: gadget: avoid memory leak when failing to allocate all eps
  usb: dwc3: remove extcon dependency
  usb: gadget: add '__ref' for rndis_config_register() and cdc_config_register()
  usb: dwc3: pci: add support for BayTrail
  usb: gadget: cdc2: fix conversion to new interface of f_ecm
  usb: gadget: fix a bug and a WARN_ON in dummy-hcd
  usb: gadget: mv_u3d_core: fix violation of locking discipline in mv_u3d_ep_disable()

11 years agoMerge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Linus Torvalds [Mon, 23 Sep 2013 02:51:49 +0000 (19:51 -0700)]
Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux

Pull drm fixes from Dave Airlie:
 - some small fixes for msm and exynos
 - a regression revert affecting nouveau users with old userspace
 - intel pageflip deadlock and gpu hang fixes, hsw modesetting hangs

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: (22 commits)
  Revert "drm: mark context support as a legacy subsystem"
  drm/i915: Don't enable the cursor on a disable pipe
  drm/i915: do not update cursor in crtc mode set
  drm/exynos: fix return value check in lowlevel_buffer_allocate()
  drm/exynos: Fix address space warnings in exynos_drm_fbdev.c
  drm/exynos: Fix address space warning in exynos_drm_buf.c
  drm/exynos: Remove redundant OF dependency
  drm/msm: drop unnecessary set_need_resched()
  drm/i915: kill set_need_resched
  drm/msm: fix potential NULL pointer dereference
  drm/i915/dvo: set crtc timings again for panel fixed modes
  drm/i915/sdvo: Robustify the dtd<->drm_mode conversions
  drm/msm: workaround for missing irq
  drm/msm: return -EBUSY if bo still active
  drm/msm: fix return value check in ERR_PTR()
  drm/msm: fix cmdstream size check
  drm/msm: hangcheck harder
  drm/msm: handle read vs write fences
  drm/i915/sdvo: Fully translate sync flags in the dtd->mode conversion
  drm/i915: Use proper print format for debug prints
  ...

11 years agoMerge branch 'for-3.12/core' of git://git.kernel.dk/linux-block
Linus Torvalds [Sun, 22 Sep 2013 22:00:11 +0000 (15:00 -0700)]
Merge branch 'for-3.12/core' of git://git.kernel.dk/linux-block

Pull block IO fixes from Jens Axboe:
 "After merge window, no new stuff this time only a collection of neatly
  confined and simple fixes"

* 'for-3.12/core' of git://git.kernel.dk/linux-block:
  cfq: explicitly use 64bit divide operation for 64bit arguments
  block: Add nr_bios to block_rq_remap tracepoint
  If the queue is dying then we only call the rq->end_io callout. This leaves bios setup on the request, because the caller assumes when the blk_execute_rq_nowait/blk_execute_rq call has completed that the rq->bios have been cleaned up.
  bio-integrity: Fix use of bs->bio_integrity_pool after free
  blkcg: relocate root_blkg setting and clearing
  block: Convert kmalloc_node(...GFP_ZERO...) to kzalloc_node(...)
  block: trace all devices plug operation

11 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux...
Linus Torvalds [Sun, 22 Sep 2013 21:58:49 +0000 (14:58 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/mason/linux-btrfs

Pull btrfs fixes from Chris Mason:
 "These are mostly bug fixes and a two small performance fixes.  The
  most important of the bunch are Josef's fix for a snapshotting
  regression and Mark's update to fix compile problems on arm"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs: (25 commits)
  Btrfs: create the uuid tree on remount rw
  btrfs: change extent-same to copy entire argument struct
  Btrfs: dir_inode_operations should use btrfs_update_time also
  btrfs: Add btrfs: prefix to kernel log output
  btrfs: refuse to remount read-write after abort
  Btrfs: btrfs_ioctl_default_subvol: Revert back to toplevel subvolume when arg is 0
  Btrfs: don't leak transaction in btrfs_sync_file()
  Btrfs: add the missing mutex unlock in write_all_supers()
  Btrfs: iput inode on allocation failure
  Btrfs: remove space_info->reservation_progress
  Btrfs: kill delay_iput arg to the wait_ordered functions
  Btrfs: fix worst case calculator for space usage
  Revert "Btrfs: rework the overcommit logic to be based on the total size"
  Btrfs: improve replacing nocow extents
  Btrfs: drop dir i_size when adding new names on replay
  Btrfs: replay dir_index items before other items
  Btrfs: check roots last log commit when checking if an inode has been logged
  Btrfs: actually log directory we are fsync()'ing
  Btrfs: actually limit the size of delalloc range
  Btrfs: allocate the free space by the existed max extent size when ENOSPC
  ...

11 years agocfq: explicitly use 64bit divide operation for 64bit arguments
Anatol Pomozov [Sun, 22 Sep 2013 18:43:47 +0000 (12:43 -0600)]
cfq: explicitly use 64bit divide operation for 64bit arguments

'samples' is 64bit operant, but do_div() second parameter is 32.
do_div silently truncates high 32 bits and calculated result
is invalid.

In case if low 32bit of 'samples' are zeros then do_div() produces
kernel crash.

Signed-off-by: Anatol Pomozov <anatol.pomozov@gmail.com>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
11 years agoMerge tag 'iio-for-3.13a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23...
Greg Kroah-Hartman [Sun, 22 Sep 2013 18:30:12 +0000 (11:30 -0700)]
Merge tag 'iio-for-3.13a' of git://git./linux/kernel/git/jic23/iio into staging-next

Jonathan writes:

First round of new drivers, functionality and cleanups for IIO in the 3.13 cycle

A number of new drivers and some new functionality + a lot of cleanups
all over IIO.

New Core Elements

1) New INT_TIME info_mask element for integration time, which may have
   different effects on measurement noise and similar, than an amplifier
   and hence is different from existing SCALE.  Already existed in some
   drivers as a custom attribute.

2) Introduce a iio_push_buffers_with_timestamp helper to cover the common
   case of filling the last 64 bits of data to be passed to the buffer with
   a timestamp.  Applied to lots of drivers. Cuts down on repeated code and
   moves a slightly fiddly bit of logic into a single location.

3) Introduce info_mask_[shared_by_dir/shared_by_all] elements to allow support
   of elements such as sampling_frequency which is typically shared by all
   input channels on a device.  This reduces code and makes these controls
   available from in kernel consumers of IIO devices.

New drivers

1) MCP3422/3/4 ADC

2) TSL4531 ambient light sensor

3) TCS3472/5 color light sensor

4) GP2AP020A00F ambient light / proximity sensor

5) LPS001WP support added to ST pressure sensor driver.

New driver functionality

1) ti_am335x_adc Add buffered sampling support.
   This device has a hardware fifo that is fed directly into an IIO kfifo
   buffer based on a watershed interrupt.  Note this will act as an example
   of how to handle this increasingly common type of device.
   The only previous example - sca3000 - take a less than optimal approach
   which is largely why it is still in staging.
   A couple of little cleanups for that new functionality followed later.

Core cleanups:

1) MAINTAINERS - Sachin actually brought my email address up to date because
   I said I'd do it and never got around to it :)

2) Assign buffer list elements as single element lists to simplify the
   iio_buffer_is_active logic.

3) wake_up_interruptible_poll instead of wake_up_interruptible to only wake
   up threads waiting for poll notifications.

4) Add O_CLOEXEC flag to anon_inode_get_fd call for IIO event interface.

5) Change iio_push_to_buffers to take a void * pointer so as to avoid some
   annoying and unnecessary type casts.

6) iio_compute_scan_bytes incorrectly took a long rather than unsigned long.

7) Various minor tidy ups.

Driver cleanups (in no particular order)

1) Another set of devm_ allocations patches from Sachin Kamat.

2) tsl2x7x - 0 to NULL cleanup.

3) hmc5843 - fix missing > in MODULE_AUTHOR

4) Set of strict_strto* to kstrto* conversions.

5) mxs-lradc - fix ordering of resource removal to match creation

6) mxs-lradc - add MODULE_ALIAS

7) adc7606 - drop a work pending test duplicated in core functions.

8) hmc5843 - devm_ allocation patch

9) Series of redundant breaks removed.

10) ad2s1200 - pr_err -> dev_err

11) adjd_s311 - use INT_TIME

12)  ST sensors - large set of cleanups from Lee Jones and removed restriction
    to using only triggers provided by the st_sensors themselves from
    Dennis Ciocca.

13) dummy and tmp006 provide sampling_frequency via info_mask_shared_by_all.

14) tcs3472 - fix incorrect buffer size and wrong device pointer used in
    suspend / resume functions.

15) max1363 - use defaults for buffer setup ops as provided by the triggered
    buffer helpers as they are the same as were specified in max1363 driver.

16) Trivial tidy ups in a number of other drivers.

11 years agoiio: ti_am335x_adc: cleanup error case
Zubair Lutfullah [Sun, 22 Sep 2013 08:20:00 +0000 (09:20 +0100)]
iio: ti_am335x_adc: cleanup error case

Driver is functional without this error case. Cleaned up.

Signed-off-by: Zubair Lutfullah <zubair.lutfullah@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio: ti_am335x_adc: cleanup trigger related code
Zubair Lutfullah [Sun, 22 Sep 2013 08:20:00 +0000 (09:20 +0100)]
iio: ti_am335x_adc: cleanup trigger related code

Trigger related headers and variables are not needed
as driver is now based on INDIO_BUFFER_HARDWARE mode

Signed-off-by: Zubair Lutfullah <zubair.lutfullah@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio: ti_am335x_adc: fix static in function header
Zubair Lutfullah [Sun, 22 Sep 2013 08:20:00 +0000 (09:20 +0100)]
iio: ti_am335x_adc: fix static in function header

Static is missing in function header. Corrected.

Signed-off-by: Zubair Lutfullah <zubair.lutfullah@gmail.com>
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoMerge tag 'iio-fixes-for-3.12a' of git://git.kernel.org/pub/scm/linux/kernel/git...
Greg Kroah-Hartman [Sat, 21 Sep 2013 23:45:36 +0000 (16:45 -0700)]
Merge tag 'iio-fixes-for-3.12a' of git://git./linux/kernel/git/jic23/iio into staging-linus

Jonathan writes:

First round of IIO fixes for 3.12

A series of wrong 'struct dev' assumptions in suspend/resume callbacks
following on from this issue being identified in a new driver review.
One to watch out for in future.

A number of driver specific fixes
1) at91 - fix a overflow in clock rate computation
2) dummy - Kconfig dependency issue
3) isl29018 - uninitialized value
4) hmc5843 - measurement conversion bug introduced by recent cleanup.
5) ade7854-spi - wrong return value.

Some IIO core fixes
1) Wrong value picked up for event code creation for a modified channel
2) A null dereference on failure to initialize a buffer after no buffer has
   been in use, when using the available_scan_masks approach.
3) Sampling not stopped when a device is removed. Effects forced removal
   such as hot unplugging.
4) Prevent device going away if a chrdev is still open in userspace.
5) Prevent race on chardev opening and device being freed.
6) Add a missing iio_buffer_init in the call back buffer.

These last few are the first part of a set from Lars-Peter Clausen who
has been taking a closer look at our removal paths and buffer handling
than anyone has for quite some time.

11 years agoMerge tag 'nfs-for-3.12-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs
Linus Torvalds [Sat, 21 Sep 2013 22:59:41 +0000 (15:59 -0700)]
Merge tag 'nfs-for-3.12-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs

Pull NFS client bugfix from Trond Myklebust:
 "Fix a regression due to incorrect sharing of gss auth caches"

* tag 'nfs-for-3.12-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
  RPCSEC_GSS: fix crash on destroying gss auth

11 years agoblock: Add nr_bios to block_rq_remap tracepoint
Jun'ichi Nomura [Sat, 21 Sep 2013 19:57:47 +0000 (13:57 -0600)]
block: Add nr_bios to block_rq_remap tracepoint

Adding the number of bios in a remapped request to 'block_rq_remap'
tracepoint.

Request remapper clones bios in a request to track the completion
status of each bio. So the number of bios can be useful information
for investigation.

Related discussions:
  http://www.redhat.com/archives/dm-devel/2013-August/msg00084.html
  http://www.redhat.com/archives/dm-devel/2013-September/msg00024.html

Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
Acked-by: Mike Snitzer <snitzer@redhat.com>
Cc: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
11 years agoiio:press: Register buffer also without specific trigger
Denis CIOCCA [Wed, 18 Sep 2013 09:00:00 +0000 (10:00 +0100)]
iio:press: Register buffer also without specific trigger

This patch fix buffer registration that allows to use generic IIO trigger.

Signed-off-by: Denis Ciocca <denis.ciocca@st.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio:magn: Register buffer also without specific trigger
Denis CIOCCA [Wed, 18 Sep 2013 09:00:00 +0000 (10:00 +0100)]
iio:magn: Register buffer also without specific trigger

This patch fix buffer registration that allows to use generic IIO trigger.

Signed-off-by: Denis Ciocca <denis.ciocca@st.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio:gyro: Register buffer also without specific trigger
Denis CIOCCA [Wed, 18 Sep 2013 09:00:00 +0000 (10:00 +0100)]
iio:gyro: Register buffer also without specific trigger

This patch fix buffer registration that allows to use generic IIO trigger.

Signed-off-by: Denis Ciocca <denis.ciocca@st.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio:accel: Register buffer also without specific trigger
Denis CIOCCA [Wed, 18 Sep 2013 09:00:00 +0000 (10:00 +0100)]
iio:accel: Register buffer also without specific trigger

This patch fix buffer registration that allows to use generic IIO trigger.

Signed-off-by: Denis Ciocca <denis.ciocca@st.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio: magn-core: st: Clean up error handling in probe()
Lee Jones [Mon, 16 Sep 2013 16:02:00 +0000 (17:02 +0100)]
iio: magn-core: st: Clean up error handling in probe()

Reduce the amount of those unnecessary goto calls, as in most cases
we can simply return immediately. We also only call for the IRQ number
once and use that value throughout.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio: gyro-core: st: Clean up error handling in probe()
Lee Jones [Mon, 16 Sep 2013 16:02:00 +0000 (17:02 +0100)]
iio: gyro-core: st: Clean up error handling in probe()

Reduce the amount of those unnecessary goto calls, as in most cases
we can simply return immediately. We also only call for the IRQ number
once and use that value throughout.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio: accel-core: st: Clean up error handling in probe()
Lee Jones [Mon, 16 Sep 2013 16:02:00 +0000 (17:02 +0100)]
iio: accel-core: st: Clean up error handling in probe()

Reduce the amount of those unnecessary goto calls, as in most cases
we can simply return immediately. We also only call for the IRQ number
once and use that value throughout.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio: pressure: st: Add support for new LPS001WP pressure sensor
Lee Jones [Mon, 16 Sep 2013 16:02:00 +0000 (17:02 +0100)]
iio: pressure: st: Add support for new LPS001WP pressure sensor

Here we use existing practices to introduce support for another
pressure/temperature sensor, the LPS001WP.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio: pressure-core: st: Clean-up probe() function
Lee Jones [Mon, 16 Sep 2013 16:02:00 +0000 (17:02 +0100)]
iio: pressure-core: st: Clean-up probe() function

This patch contains some pretty basic clean-ups in probe() pertaining to
the simplification of error handling and a couple of readability adaptions.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio: sensors-core: st: Clean-up error handling in st_sensors_read_axis_data()
Lee Jones [Mon, 16 Sep 2013 16:02:00 +0000 (17:02 +0100)]
iio: sensors-core: st: Clean-up error handling in st_sensors_read_axis_data()

Gets rid of those unnecessary gotos.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio: sensors-core: st: Clean-up error handling in st_sensors_init_sensor()
Lee Jones [Mon, 16 Sep 2013 16:02:00 +0000 (17:02 +0100)]
iio: sensors-core: st: Clean-up error handling in st_sensors_init_sensor()

Strip out all those unnecessary gotos and just return the error right away.

Aids to simplicity and reduces code.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio: sensors-core: st: Support sensors which don't have a Data Ready pin
Lee Jones [Mon, 16 Sep 2013 16:02:00 +0000 (17:02 +0100)]
iio: sensors-core: st: Support sensors which don't have a Data Ready pin

Not all ST's sensors support data ready, so let's make the declaration
of one conditional.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agostaging:iio:ade7758: Use iio_push_to_buffers_with_timestamp()
Lars-Peter Clausen [Thu, 19 Sep 2013 13:00:00 +0000 (14:00 +0100)]
staging:iio:ade7758: Use iio_push_to_buffers_with_timestamp()

Makes the code a bit shorter and less ugly.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agostaging:iio:dummy: Use iio_push_to_buffers_with_timestamp()
Lars-Peter Clausen [Thu, 19 Sep 2013 13:00:00 +0000 (14:00 +0100)]
staging:iio:dummy: Use iio_push_to_buffers_with_timestamp()

Makes the code a bit shorter and less ugly.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agostaging:iio:mxs-lradc: Use iio_push_to_buffers_with_timestamp()
Lars-Peter Clausen [Thu, 19 Sep 2013 12:59:00 +0000 (13:59 +0100)]
staging:iio:mxs-lradc: Use iio_push_to_buffers_with_timestamp()

Makes the code a bit shorter and less ugly.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Reviewed-by: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agostaging:iio:ad799x: Use iio_push_to_buffers_with_timestamp()
Lars-Peter Clausen [Thu, 19 Sep 2013 12:59:00 +0000 (13:59 +0100)]
staging:iio:ad799x: Use iio_push_to_buffers_with_timestamp()

Makes the code a bit shorter and less ugly.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agostaging:iio:ad7606: Use iio_push_to_buffers_with_timestamp()
Lars-Peter Clausen [Thu, 19 Sep 2013 12:59:00 +0000 (13:59 +0100)]
staging:iio:ad7606: Use iio_push_to_buffers_with_timestamp()

Makes the code a bit shorter and less ugly.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agostaging:iio:lis3l02dq: Use iio_push_to_buffers_with_timestamp()
Lars-Peter Clausen [Thu, 19 Sep 2013 12:59:00 +0000 (13:59 +0100)]
staging:iio:lis3l02dq: Use iio_push_to_buffers_with_timestamp()

Makes the code a bit shorter and less ugly.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio:gp2ap020a00f: Use iio_push_to_buffers_with_timestamp()
Lars-Peter Clausen [Thu, 19 Sep 2013 12:59:00 +0000 (13:59 +0100)]
iio:gp2ap020a00f: Use iio_push_to_buffers_with_timestamp()

Makes the code a bit shorter and less ugly.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Cc: Jacek Anaszewski <j.anaszewski@samsung.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio:tcs3472: Use iio_push_to_buffers_with_timestamp()
Lars-Peter Clausen [Thu, 19 Sep 2013 12:59:00 +0000 (13:59 +0100)]
iio:tcs3472: Use iio_push_to_buffers_with_timestamp()

Makes the code a bit shorter and less ugly.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Cc: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio:adjd_s311: Use iio_push_to_buffers_with_timestamp()
Lars-Peter Clausen [Thu, 19 Sep 2013 12:59:00 +0000 (13:59 +0100)]
iio:adjd_s311: Use iio_push_to_buffers_with_timestamp()

Makes the code a bit shorter and less ugly.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Cc: Peter Meerwald <pmeerw@pmeerw.net>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio:mpu6050: Use iio_push_to_buffers_with_timestamp()
Lars-Peter Clausen [Thu, 19 Sep 2013 12:59:00 +0000 (13:59 +0100)]
iio:mpu6050: Use iio_push_to_buffers_with_timestamp()

Makes the code a bit shorter and less ugly.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Cc: Ge Gao <ggao@invensense.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio:adis_lib: Use iio_push_to_buffers_with_timestamp()
Lars-Peter Clausen [Thu, 19 Sep 2013 12:59:00 +0000 (13:59 +0100)]
iio:adis_lib: Use iio_push_to_buffers_with_timestamp()

Makes the code a bit shorter and less ugly.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio:adis16400: Use iio_push_to_buffers_with_timestamp()
Lars-Peter Clausen [Thu, 19 Sep 2013 12:59:00 +0000 (13:59 +0100)]
iio:adis16400: Use iio_push_to_buffers_with_timestamp()

Makes the code a bit shorter and less ugly.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio:itg3200: Use iio_push_to_buffers_with_timestamp()
Lars-Peter Clausen [Thu, 19 Sep 2013 12:59:00 +0000 (13:59 +0100)]
iio:itg3200: Use iio_push_to_buffers_with_timestamp()

Makes the code a bit shorter and less ugly.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Cc: Manuel Stahl <manuel.stahl@iis.fraunhofer.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio:st_sensors: Use iio_push_to_buffers_with_timestamp()
Lars-Peter Clausen [Thu, 19 Sep 2013 12:59:00 +0000 (13:59 +0100)]
iio:st_sensors: Use iio_push_to_buffers_with_timestamp()

Makes the code a bit shorter and less ugly.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Cc: Denis Ciocca <denis.ciocca@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio:max1363: Use iio_push_to_buffers_with_timestamp()
Lars-Peter Clausen [Thu, 19 Sep 2013 12:59:00 +0000 (13:59 +0100)]
iio:max1363: Use iio_push_to_buffers_with_timestamp()

Makes the code a bit shorter and less ugly.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio:at91_adc: Use iio_push_to_buffers_with_timestamp()
Lars-Peter Clausen [Thu, 19 Sep 2013 12:59:00 +0000 (13:59 +0100)]
iio:at91_adc: Use iio_push_to_buffers_with_timestamp()

Makes the code a bit shorter and less ugly.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Cc: Josh Wu <josh.wu@atmel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agoiio:ad_sigma_delta: Use iio_push_to_buffers_with_timestamp()
Lars-Peter Clausen [Thu, 19 Sep 2013 12:59:00 +0000 (13:59 +0100)]
iio:ad_sigma_delta: Use iio_push_to_buffers_with_timestamp()

Makes the code a bit shorter and less ugly.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>