GitHub/moto-9609/android_kernel_motorola_exynos9610.git
8 years agostaging: comedi: ni_mio_common: fix logical continuations
H Hartley Sweeten [Thu, 14 Apr 2016 16:57:58 +0000 (09:57 -0700)]
staging: comedi: ni_mio_common: fix logical continuations

Fix the checkpatch.pl issues:
CHECK: Logical continuations should be on the previous line

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>
8 years agostaging: comedi: ni_mio_common: multiple assignments should be avoided
H Hartley Sweeten [Thu, 14 Apr 2016 16:57:57 +0000 (09:57 -0700)]
staging: comedi: ni_mio_common: multiple assignments should be avoided

Fix the checkpatch.pl issues.

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>
8 years agostaging: comedi: ni_mio_common: fix lines over 80 characters
H Hartley Sweeten [Thu, 14 Apr 2016 16:57:56 +0000 (09:57 -0700)]
staging: comedi: ni_mio_common: fix lines over 80 characters

Fix the checkpatch.pl issues.

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>
8 years agostaging: comedi: ni_mio_common: tidy up block comments
H Hartley Sweeten [Thu, 14 Apr 2016 16:57:55 +0000 (09:57 -0700)]
staging: comedi: ni_mio_common: tidy up block comments

Fix the checkpatch.pl issues.
WARNING: Block comments use * on subsequent lines

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>
8 years agostaging: comedi: ni_mio_common: use 'unsigned int' instead of kernel types
H Hartley Sweeten [Thu, 14 Apr 2016 16:57:54 +0000 (09:57 -0700)]
staging: comedi: ni_mio_common: use 'unsigned int' instead of kernel types

Generally comedi drivers use 'unsigned int' types instead of the kernel type
'u32' for unsigned 32-bit values.

For aesthetics, change all the 'u32' and 'uin32_t' types and fix the
checkpatch.pl issues about:
CHECK: Prefer kernel type 'u32' over 'uint32_t'

The various i/o helpers use for reading and writing the 32/16/8-bit registers
all start with an 'unsigned int' value for writing and finally return an
'unsigned int' value. For aesthetics, change all the 'uint16_t' and 'uint8_t'
types for insigned int and fix the checkpatch.pl issues about:
CHECK: Prefer kernel type 'u16' over 'uint16_t'

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>
8 years agostaging: comedi: ni_mio_common: Prefer 'unsigned int' to bare use of 'unsigned'
H Hartley Sweeten [Thu, 14 Apr 2016 16:57:53 +0000 (09:57 -0700)]
staging: comedi: ni_mio_common: Prefer 'unsigned int' to bare use of 'unsigned'

Fix the checkpatch.pl issues.

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>
8 years agostaging: comedi: ni_mio_common: tidy up DIO subdevice ifdef'ery
H Hartley Sweeten [Thu, 14 Apr 2016 16:57:52 +0000 (09:57 -0700)]
staging: comedi: ni_mio_common: tidy up DIO subdevice ifdef'ery

This file is is bit of a mess. It's included by the ni_atmio, ni_mio_cs, and
ni_pcimio drivers. The ni_pcimio driver is the only one that uses DMA. It
defines PCIDMA so that the dma code is compiled it. This causes a bunch
of ifdef'ery in the file.

The DIO subdevice for the ni_pcidio "is_m_series" boards is quite different
from the standard e-series DIO. Mainly it supports async commands that use
DMA.

Tidy up some of the ifdef'ery by adding ifdef to the subdevice init. Move
the is_m_series check to the main interrupt handler so that the unneded
handle_cdio_interrupt() can be blocked out for the ni_atmio and ni_mio_cs
drivers.

Consolidate the other ifdef's to block out the affected code.

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>
8 years agostaging: comedi: ni_mio_common: tidy up mite dma channel releases
H Hartley Sweeten [Thu, 14 Apr 2016 16:57:51 +0000 (09:57 -0700)]
staging: comedi: ni_mio_common: tidy up mite dma channel releases

Absorb the inline helper functions that call ni_set_bitfield() to clear
the dma channel selection bits.

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>
8 years agostaging: comedi: ni_mio_common: tidy up mite dma channel requests
H Hartley Sweeten [Thu, 14 Apr 2016 16:57:50 +0000 (09:57 -0700)]
staging: comedi: ni_mio_common: tidy up mite dma channel requests

Tidy up the functions that request the mite dma channels by absorbing the
inline helper functions that call ni_set_bitfield() to set the channel
selection bits.

Add support for the NI_M_CDIO_DMA_SEL_REG register to ni_set_bitfield()
so that all the soft_reg_copy_lock spinlocking is done in one place.

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>
8 years agostaging: comedi: ni_mio_common: remove some unnecessary BUG_ON()
H Hartley Sweeten [Thu, 14 Apr 2016 16:57:49 +0000 (09:57 -0700)]
staging: comedi: ni_mio_common: remove some unnecessary BUG_ON()

The mite dma channels are only requested by a subdevice with a (*do_cmd)
and they are released by a (*cancel). The comedi core will only call the
(*do_cmd) if the subdevice is not already running a command and all
commands are terminated by the core with a (*cancel).

Remove the BUG_ON() checks in the request functions which can never
happen.

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>
8 years agostaging: comedi: das1800: update the MODULE_DESCRIPTION
H Hartley Sweeten [Fri, 8 Apr 2016 19:42:06 +0000 (12:42 -0700)]
staging: comedi: das1800: update the MODULE_DESCRIPTION

Change the MODULE_DESCRIPTION to something more usefull than 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>
8 years agostaging: comedi: das1800: allow setting the external trigger polarity
H Hartley Sweeten [Fri, 8 Apr 2016 19:42:05 +0000 (12:42 -0700)]
staging: comedi: das1800: allow setting the external trigger polarity

The external pin TGIN can be used to start and/or stop the analog input
command. Currently the driver only supports negative edge polarity for
this signal.

Add support to allow the user to select positive edge polarity using
the CR_INVERT flag.

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>
8 years agostaging: comedi: das1800: clarify the analog input cmd triggers
H Hartley Sweeten [Fri, 8 Apr 2016 19:42:04 +0000 (12:42 -0700)]
staging: comedi: das1800: clarify the analog input cmd triggers

Clarify the documentation in the comedi driver comment block to
better explain the cmd triggert.

Add a comment to step 2b of the (*do_cmdtest) to clarify the
trigger check.

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>
8 years agostaging: comedi: das1800: fix comments about the 'ao' board range
H Hartley Sweeten [Fri, 8 Apr 2016 19:42:03 +0000 (12:42 -0700)]
staging: comedi: das1800: fix comments about the 'ao' board range

The waveform analog outputs on the 'ao' boards are not currently
supported. Modify the comment about the analog output range on
these boards so that the information is saved but fixes the
checkpatch.pl issues:
WARNING: Block comments use a trailing */ on a separate line

Move the comment so it's grouped with the comedi_lrange info.

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>
8 years agostaging: comedi: das1800: fix lines over 80 characters
H Hartley Sweeten [Fri, 8 Apr 2016 19:42:02 +0000 (12:42 -0700)]
staging: comedi: das1800: fix lines over 80 characters

These comments are just extra cruft. Remove them to fix the
checkpatch.pl issues:
WARNING: line over 80 characters

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>
8 years agostaging: comedi: das1800: fix comments in das1800_ai_handler()
H Hartley Sweeten [Fri, 8 Apr 2016 19:42:01 +0000 (12:42 -0700)]
staging: comedi: das1800: fix comments in das1800_ai_handler()

Fix the checkpatch.pl issues:
WARNING: line over 80 characters

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>
8 years agostaging: comedi: das1800: fix comments in das1800_ai_cmd()
H Hartley Sweeten [Fri, 8 Apr 2016 19:42:00 +0000 (12:42 -0700)]
staging: comedi: das1800: fix comments in das1800_ai_cmd()

Fix the checkpatch.pl issues:
WARNING: Block comments use a trailing */ on a separate line
WARNING: line over 80 characters

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>
8 years agostaging: comedi: das1800: remove the function comments
H Hartley Sweeten [Fri, 8 Apr 2016 19:41:59 +0000 (12:41 -0700)]
staging: comedi: das1800: remove the function comments

These comments are just added cruft. 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>
8 years agostaging: comedi: das1800: clarify step 4 of the ai (*do_cmdtest)
H Hartley Sweeten [Fri, 8 Apr 2016 19:41:58 +0000 (12:41 -0700)]
staging: comedi: das1800: clarify step 4 of the ai (*do_cmdtest)

This step of the (*do_cmdtest) fixes the timing arguments when the
cmd->convert_src is TRIG_TIMER. The code is compact but it's a bit
hard to understand the "burst mode" vs. "non burst mode" (i.e. paced)
timing.

Clarify the fixup by splitting it into separate functions to check
the arguments based on if the command is doing 'paced' or 'burst'
timing. Add some comments to clarify the fixups.

This also fixes a minor issue with the 'burst' timing. When the
cmd->scan_begin_src is also TRIG_TIMER the pacer clock is used to
start each scan. The cmd->scan_begin_arg specifies the scan time.
The minimum (not maximum) value for this time must be large enough
for the 'burst' conversion time to sample all the channels.

The current 'max' check limits the scan time to the minimum time
(i.e. the max conversion speed).

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>
8 years agostaging: comedi: das1800: remove the private data member comments
H Hartley Sweeten [Fri, 8 Apr 2016 19:41:57 +0000 (12:41 -0700)]
staging: comedi: das1800: remove the private data member comments

The comments about the members of the private data are not really
necessary and removing them fixes a couple checkpatch.pl issues.

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>
8 years agostaging: comedi: das1800: move comment about max conversion speeds
H Hartley Sweeten [Fri, 8 Apr 2016 19:41:56 +0000 (12:41 -0700)]
staging: comedi: das1800: move comment about max conversion speeds

For aesthetics, move this information into the comedi comment block.

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>
8 years agostaging: comedi: das1800: change type of private data 'fifo_buf'
H Hartley Sweeten [Fri, 8 Apr 2016 19:41:55 +0000 (12:41 -0700)]
staging: comedi: das1800: change type of private data 'fifo_buf'

Fix the checkpatch.pl issue:
CHECK: Prefer kernel type 'u16' over 'uint16_t'

Change the type to 'unsigned short' as that is more typical in comedi
drivers.

Use sizeof(*p) instead of sizeof(type) when allocation the buffer.
Also fix the checkpatch.pl issue:
WARNING: line over 80 characters

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>
8 years agostaging: comedi: das1800: cleanup copyright and comedi comment blocks
H Hartley Sweeten [Fri, 8 Apr 2016 19:41:54 +0000 (12:41 -0700)]
staging: comedi: das1800: cleanup copyright and comedi comment blocks

Tidy up these multi-line comments to fix the checkpatch.pl issues:
WARNING: Block comments use * on subsequent lines
WARNING: line over 80 characters

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>
8 years agostaging: comedi: das1800: document the spinlock
H Hartley Sweeten [Fri, 8 Apr 2016 19:41:53 +0000 (12:41 -0700)]
staging: comedi: das1800: document the spinlock

The comedi_device spinlock is used to protect the indirect addressing
selected by the DAS1800_SELECT register. It also prevents races between
the interrupt handler and the analog input (*poll).

Update the comments to make this clear.

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>
8 years agostaging: comedi: das1800: absorb control_a_bits()
H Hartley Sweeten [Fri, 8 Apr 2016 19:41:52 +0000 (12:41 -0700)]
staging: comedi: das1800: absorb control_a_bits()

Absorb this helper function into the analog input (*do_cmd).
For aesthetics, convert the switch code into if/else.

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>
8 years agostaging: comedi: das1800: use comedi_timeout()
H Hartley Sweeten [Fri, 8 Apr 2016 19:41:51 +0000 (12:41 -0700)]
staging: comedi: das1800: use comedi_timeout()

Use the helper function to handle the busywaiting for the analog
input conversion to complete.

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>
8 years agostaging: comedi: das1800: refactor program_chanlist()
H Hartley Sweeten [Fri, 8 Apr 2016 19:41:50 +0000 (12:41 -0700)]
staging: comedi: das1800: refactor program_chanlist()

Refactor this function so it can be used to program the chanlist for
the analog input (*do_cmd) and (*insn_read).

Rename the function so it has namespace associated with 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>
8 years agostaging: comedi: das1800: absorb control_c_bits()
H Hartley Sweeten [Fri, 8 Apr 2016 19:41:49 +0000 (12:41 -0700)]
staging: comedi: das1800: absorb control_c_bits()

Absorb this helper function into the analog input (*do_cmd).
For aesthetics, convert the switch code into if/else.

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>
8 years agostaging: comedi: das1800: introduce das1800_ai_chanspec_bits()
H Hartley Sweeten [Fri, 8 Apr 2016 19:41:48 +0000 (12:41 -0700)]
staging: comedi: das1800: introduce das1800_ai_chanspec_bits()

Introduce a helper function for the common code needed to set the
control c register bits for a channel specification.

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>
8 years agostaging: comedi: das1800: add analog output readback
H Hartley Sweeten [Fri, 8 Apr 2016 19:41:47 +0000 (12:41 -0700)]
staging: comedi: das1800: add analog output readback

Use the core provided readback support to allow reading back the last
value written to the analog output channels.

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>
8 years agostaging: comedi: das1800: change type of 'ai_speed' boardinfo
H Hartley Sweeten [Fri, 8 Apr 2016 19:41:46 +0000 (12:41 -0700)]
staging: comedi: das1800: change type of 'ai_speed' boardinfo

This value is compared against the unsigned int cmd->convert_arg to
check the minimum value (max speed) for the analog input conversion
timing.

For aesthetics, change the type to match the cmd->convert_arg type.

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>
8 years agostaging: comedi: das1800: remove 'qram_len' boardinfo
H Hartley Sweeten [Fri, 8 Apr 2016 19:41:45 +0000 (12:41 -0700)]
staging: comedi: das1800: remove 'qram_len' boardinfo

The "hc" type boards have 64 analog input channels with a 64
entry queue. All the others have 16 channels and a 256 entry
queue.

EXP-1800 expansion boards can be used to increase the number
of analog inputs on the 16 channel boards, 16 channels per
EXP-1800, for a total of 256 channels.

Remove the 'qram_len' member of the boardinfo and use the
'id' member to determine the number of channels.

Add a comment about the number of channels and the unclear
mapping of the channels when EXP-1800 boards are used.

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>
8 years agostaging: comedi: das1800: refactor 'range_ai' boardinfo
H Hartley Sweeten [Fri, 8 Apr 2016 19:41:44 +0000 (12:41 -0700)]
staging: comedi: das1800: refactor 'range_ai' boardinfo

The boards supported by this driver have analog inputs with gains
of 1, 10, 50, and 250 ("01" type) or 1, 2, 4, and 8 ("02" type).
Unfortunately, the "01"/"02" type cannot be determined from the
boards id or by probing.

Replace the 'range_ai' member of the boardinfo with a bit-field flag,
'is_01_series' and only set it for the "01" type boards. Remove the
unnecessary initialization for the "02" type boards.

For aesthetics, rename the comedi_lrange arrays and document the gain.

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>
8 years agostaging: comedi: das1800: remove 'ao_ability' boardinfo
H Hartley Sweeten [Fri, 8 Apr 2016 19:41:43 +0000 (12:41 -0700)]
staging: comedi: das1800: remove 'ao_ability' boardinfo

The "da" and "hc" type boards have normal analog outputs. The
"ao" type boards have move advanced analog outputs with waveform
generation capability.

Remove the 'ao_ability' member of the boardinfo and use the
'id' member to determine if the subdevice should be initialized.

The "ao" waveform analog outputs are not currently supported.
For aesthetics, add an else if for the initialization of the
subdevice for these boards.

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>
8 years agostaging: comedi: das1800: remove 'ao_n_chan' boardinfo
H Hartley Sweeten [Fri, 8 Apr 2016 19:41:42 +0000 (12:41 -0700)]
staging: comedi: das1800: remove 'ao_n_chan' boardinfo

The "st-da" board types have 4 analog output channels. All other
board types, with analog outputs, only have 2 channels.

Remove the 'ao_n_chan' member of the boardinfo and use the
'id' member to determine the subdevice 'n_chan'.

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>
8 years agostaging: comedi: das1800: tidy up das1800_ao_insn_write()
H Hartley Sweeten [Fri, 8 Apr 2016 19:41:41 +0000 (12:41 -0700)]
staging: comedi: das1800: tidy up das1800_ao_insn_write()

The (*insn_write) functions are supposed to write insn->n values to the
specified channel. Tidy up this function and make it work like the core
expects.

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>
8 years agostaging: comedi: das1800: initialize all analog outputs
H Hartley Sweeten [Fri, 8 Apr 2016 19:41:40 +0000 (12:41 -0700)]
staging: comedi: das1800: initialize all analog outputs

The current code used to initialize the analog outputs only sets the
last channel. The other channels will be reloaded with the last value
that was written to them.

Move the code into the subdevice init and properly initialize all the
channels to 0V.

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>
8 years agostaging: comedi: das1800: remove 'do_n_chan' boardinfo
H Hartley Sweeten [Fri, 8 Apr 2016 19:41:39 +0000 (12:41 -0700)]
staging: comedi: das1800: remove 'do_n_chan' boardinfo

The "hc" type boards have 8 digtial outputs. All other board
types have 4.

Remove the 'do_n_chan' member of the boardinfo and use the
'id' member to determine the subdevice 'n_chan'.

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>
8 years agostaging: comedi: das1800: remove 'resolution' boardinfo
H Hartley Sweeten [Fri, 8 Apr 2016 19:41:38 +0000 (12:41 -0700)]
staging: comedi: das1800: remove 'resolution' boardinfo

The "hr" type boards have 16-bit analog inputs and outputs.
All other board types have 12-bit.

Remove the 'resolution' member of the boardinfo and use the
'id' member to determine the subdevices '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>
8 years agostaging: comedi: das1800: use comedi_offset_munge() for analog output
H Hartley Sweeten [Fri, 8 Apr 2016 19:41:37 +0000 (12:41 -0700)]
staging: comedi: das1800: use comedi_offset_munge() for analog output

The analog outputs expect 2's complement data. For aesthetics, use
the helper function to handle the munging instead of depending on
the boardinfo 'resolution'.

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>
8 years agostaging: comedi: das1800: remove 'common' boardinfo member
H Hartley Sweeten [Fri, 8 Apr 2016 19:41:36 +0000 (12:41 -0700)]
staging: comedi: das1800: remove 'common' boardinfo member

The "hc" type boards do not support common mode analog inputs
all the other board types do.

Remove the unnecessary member from the boardinfo and use the
'id' member to determine if the SDF_COMMON flag should be set
for the 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>
8 years agostaging: comedi: das1800: tidy up das1800_probe()
H Hartley Sweeten [Fri, 8 Apr 2016 19:41:35 +0000 (12:41 -0700)]
staging: comedi: das1800: tidy up das1800_probe()

Refactor das1800_probe() to return an errno instead of the boardinfo
pointer.

Add the board 'id' to the boardinfo to tidy up this function to clarify
the sanity check when the user provided a board name when trying to
attach to the driver.

Currently when this function probes for a boardinfo based on the board
id it returns the wrong boardinfo for the "st-da" and "hr-da" types.
This causes the analog input subdevice for those boards to not be
available. Fix the probe so that a proper boardinfo is used.

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>
8 years agostaging: comedi: das1800: tidy up boardinfo
H Hartley Sweeten [Fri, 8 Apr 2016 19:41:34 +0000 (12:41 -0700)]
staging: comedi: das1800: tidy up boardinfo

For aesthetics, add some whitespace to the boardinfo array.

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>
8 years agostaging: comedi: das1800: tidy up analog input subdevice init
H Hartley Sweeten [Fri, 8 Apr 2016 19:41:33 +0000 (12:41 -0700)]
staging: comedi: das1800: tidy up analog input subdevice init

For aesthetics, add some whitespace to the subdevice init and rename
the subdevice support functions.

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>
8 years agostaging: comedi: das1800: tidy up analog output subdevice init
H Hartley Sweeten [Fri, 8 Apr 2016 19:41:32 +0000 (12:41 -0700)]
staging: comedi: das1800: tidy up analog output subdevice init

For aesthetics, add some whitespace to the subdevice init and rename
the (*insn_write) function.

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>
8 years agostaging: comedi: das1800: tidy up digital input subdevice init
H Hartley Sweeten [Fri, 8 Apr 2016 19:41:31 +0000 (12:41 -0700)]
staging: comedi: das1800: tidy up digital input subdevice init

For aesthetics, add some whitespace to the subdevice init and rename
the (*insn_bits) function.

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>
8 years agostaging: comedi: das1800: tidy up digital output subdevice init
H Hartley Sweeten [Fri, 8 Apr 2016 19:41:30 +0000 (12:41 -0700)]
staging: comedi: das1800: tidy up digital output subdevice init

For aesthetics, add some whitespace to the subdevice init and rename
the (*insn_bits) function.

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>
8 years agostaging: comedi: plx9080.h: rename CamelCase enum value
H Hartley Sweeten [Mon, 11 Apr 2016 18:18:21 +0000 (11:18 -0700)]
staging: comedi: plx9080.h: rename CamelCase enum value

Rename the enum value to fix the checkpatch.pl issue:
CHECK: Avoid CamelCase: <MARB_PCIv21_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>
8 years agostaging: comedi: comedi_8254.h: tidy up the register map defines
H Hartley Sweeten [Mon, 11 Apr 2016 18:32:18 +0000 (11:32 -0700)]
staging: comedi: comedi_8254.h: tidy up the register map defines

Tidy up the defines to fix the checkpatch.pl issues:
CHECK: Prefer using the BIT 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>
8 years agostaging: comedi: amcc_s5933.h: tidy up comment issues
H Hartley Sweeten [Mon, 11 Apr 2016 18:23:25 +0000 (11:23 -0700)]
staging: comedi: amcc_s5933.h: tidy up comment issues

Tidy up the comments to fix the checkpatch.pl isses:
WARNING: Block comments use * on subsequent lines
WARNING: line over 80 characters

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>
8 years agostaging: comedi: ni_stc.h: tidy up block comments
H Hartley Sweeten [Mon, 11 Apr 2016 18:12:57 +0000 (11:12 -0700)]
staging: comedi: ni_stc.h: tidy up block comments

Tidy up the block comments to fix the checkpatch.pl issues:
WARNING: Block comments use * on subsequent lines

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>
8 years agostaging: comedi: ni_stc.h: Prefer kernel type 'u8' over 'uint8_t'
H Hartley Sweeten [Mon, 11 Apr 2016 18:12:56 +0000 (11:12 -0700)]
staging: comedi: ni_stc.h: Prefer kernel type 'u8' over 'uint8_t'

Change the type to fix the checkpatch.pl issues.

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>
8 years agostaging: comedi: ni_stc.h: Prefer 'unsigned int' to bare use of 'unsigned'
H Hartley Sweeten [Mon, 11 Apr 2016 18:12:55 +0000 (11:12 -0700)]
staging: comedi: ni_stc.h: Prefer 'unsigned int' to bare use of 'unsigned'

Change the types to fix the checkpatch.pl issues.

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>
8 years agostaging: comedi: das1800: fix das-1801st-da boardinfo
H Hartley Sweeten [Fri, 8 Apr 2016 17:15:00 +0000 (10:15 -0700)]
staging: comedi: das1800: fix das-1801st-da boardinfo

The "da" type boards all have 4 analog outputs. Fix the boardinfo
for the das-1801st-da.

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>
8 years agostaging: comedi: das1800: fix analog input sample munging
H Hartley Sweeten [Fri, 8 Apr 2016 17:14:59 +0000 (10:14 -0700)]
staging: comedi: das1800: fix analog input sample munging

The analog input samples are 2's complement when the inputs are configured
for bipolar ranges and offset binary when they are unipolar ranges. For
bipolar ranges the sample needs to be munged to the offset binary format
that comedi uses.

The (*insn_read) does the munging correctly but the async command support
incorrectly munges the data for both bipolar and unipolar ranges when
reading the remaining samples from the fifo in das1800_handle_fifo_not_empty().

Add a (*munge) function to the analog input subdevice so that the samples
are correctly munged when they are added to the async buffer by
comedi_buf_write_samples(). Add a flag to the private data and set it in
the (*do_cmd) so that the munging is only done for bipolar ranges.

Clarify the code by using the core helper functions to check the range and
do the munging.

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>
8 years agostaging: comedi: das1800: fix possible NULL dereference
H Hartley Sweeten [Fri, 8 Apr 2016 17:14:58 +0000 (10:14 -0700)]
staging: comedi: das1800: fix possible NULL dereference

DMA is optional with this driver. If it was not enabled the devpriv->dma
pointer will be NULL.

Fix the possible NULL pointer dereference when trying to disable the DMA
channels in das1800_ai_cancel() and tidy up the comments to fix the
checkpatch.pl issues:
WARNING: line over 80 characters

It's probably harmless in das1800_ai_setup_dma() because the 'desc' pointer
will not be used if DMA is disabled but fix it there also.

Fixes: 99dfc3357e98 ("staging: comedi: das1800: remove depends on ISA_DMA_API limitation")
Cc: <stable@vger.kernel.org> # 4.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>
8 years agostaging: unisys: visorbus: initialize variables
David Binder [Tue, 19 Apr 2016 03:40:09 +0000 (23:40 -0400)]
staging: unisys: visorbus: initialize variables

Initializes previously uninitialized variables that were flagged
as being problematic by Smatch.

Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: unisys: visorbus: remove unused chipsetready information
Erik Arfvidson [Tue, 19 Apr 2016 12:11:52 +0000 (08:11 -0400)]
staging: unisys: visorbus: remove unused chipsetready information

Chipsetready sysfs entry is not used by any guests or service
partitions.

remove unused g_chipset_msg_hdr our service partition

remove unused chipsetready_store and driver attributes:
        chipsetready_store()
        visorchipset_guest_attrs
        visorchipset_guest_groupw

remove unused chipsets_events:
        check_chipset_events()
        clear_chipset_events()
        visorchipset_holdchipsetready

remove sysfs documentation dealing with chipsetready

Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: unisys: include: Added kerneldoc comments to visor_device
Alexander Curtin [Tue, 19 Apr 2016 03:22:02 +0000 (23:22 -0400)]
staging: unisys: include: Added kerneldoc comments to visor_device

The visor_device struct is used between multiple drivers, so this
adds kerneldoc comments to the fields.

Signed-off-by: Alexander Curtin <alexander.curtin@unisys.com>
Signed-off-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: unisys: include: Added kernel-doc for struct visor_driver
Alexander Curtin [Tue, 19 Apr 2016 03:22:01 +0000 (23:22 -0400)]
staging: unisys: include: Added kernel-doc for struct visor_driver

This adds kerneldoc style comments to the visor_driver struct since
it's shared between multiple modules.

Signed-off-by: Alexander Curtin <alexander.curtin@unisys.com>
Signed-off-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: unisys: include: remove unused fields from struct visor_driver
Tim Sell [Tue, 19 Apr 2016 03:22:00 +0000 (23:22 -0400)]
staging: unisys: include: remove unused fields from struct visor_driver

The build_date and build_time fields are not used, and have been removed.

Signed-off-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: unisys: Documentation: Remove proc-entries.txt
David Binder [Wed, 13 Apr 2016 20:08:41 +0000 (16:08 -0400)]
staging: unisys: Documentation: Remove proc-entries.txt

Unisys drivers no longer utilize procfs. Therefore, the documentation
for our procfs entries is no longer needed.

Signed-off-by: David Binder <david.binder@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: unisys: added display string size define
Erik Arfvidson [Wed, 13 Apr 2016 16:07:07 +0000 (12:07 -0400)]
staging: unisys: added display string size define

Display string size that is guaranteed to be no longer the 99 characters.

Don't use a magic number throughout the code, define it once and use it
throughout.

Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: unisys: visornic: convert BUG_ON to dev_err() message
Tim Sell [Wed, 13 Apr 2016 15:56:36 +0000 (11:56 -0400)]
staging: unisys: visornic: convert BUG_ON to dev_err() message

The caller of visor_copy_fragsinfo_from_skb() is prepared to log a
dev_err() message if it fails (by returning a negative value), so we now
just fail in the one occasion where visor_copy_fragsinfo_from_skb() was
doing a BUG_ON.

There was also a problem before where visor_copy_fragsinfo_from_skb() was
returning a negative to indicate error, yet it was declared to return an
unsigned value!  So obviously that needed correcting too.

Signed-off-by: Tim Sell <Timothy.Sell@unisys.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: remove unused variables
Sudip Mukherjee [Thu, 14 Apr 2016 15:18:49 +0000 (20:48 +0530)]
staging: wilc1000: remove unused variables

These variables were havnig the pointer returned by wiphy_priv() but
they were never used.

Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agoStaging: wilc1000: Freed memory in case of error
Claudiu Beznea [Sun, 24 Apr 2016 23:07:18 +0000 (02:07 +0300)]
Staging: wilc1000: Freed memory in case of error

This patch frees memory allocated inside wilc_wlan_txq_add_cfg_pkt()
in case wilc_wlan_txq_add_to_head() fails.

Signed-off-by: Claudiu Beznea <claudiu.beznea@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: rename result in handle_set_ip_address
Chaehyun Lim [Tue, 19 Apr 2016 00:35:31 +0000 (09:35 +0900)]
staging: wilc1000: rename result in handle_set_ip_address

This patch renames result to ret that is used to get return value from
wilc_send_config_pkt. Some handle_*() functions are used as result,
others are used as ret. It will be changed as ret in all handle_*()
functions to match variable name.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: change data type of result in handle_set_ip_address
Chaehyun Lim [Tue, 19 Apr 2016 00:35:30 +0000 (09:35 +0900)]
staging: wilc1000: change data type of result in handle_set_ip_address

This patch changes data type of result variable from s32 to int. result
is used to get return value from wilc_send_config_pkt that has return
type of int.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: change handle_set_ip_address's return type to void
Chaehyun Lim [Tue, 19 Apr 2016 00:35:29 +0000 (09:35 +0900)]
staging: wilc1000: change handle_set_ip_address's return type to void

When handle_set_ip_address is called in hostIFthread that is a kernel
thread, it is not checked return type of this function. This patch
changes return type to void and removes braces if statement due to have
a single statement.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: rename result in handle_set_operation_mode
Chaehyun Lim [Wed, 6 Apr 2016 23:10:43 +0000 (08:10 +0900)]
staging: wilc1000: rename result in handle_set_operation_mode

This patch renames result to ret that is used to get return value from
wilc_send_config_pkt. Some handle_*() functions are used as result,
others are used as ret. It will be changed as ret in all handle_*()
functions to match variable name.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: change data type of result in handle_set_operation_mode
Chaehyun Lim [Wed, 6 Apr 2016 23:10:42 +0000 (08:10 +0900)]
staging: wilc1000: change data type of result in handle_set_operation_mode

This patch changes data type of result variable from s32 to int. result
is used to get return value from wilc_send_config_pkt that has return
type of int.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: change handle_set_operation_mode's return type to void
Chaehyun Lim [Wed, 6 Apr 2016 23:10:41 +0000 (08:10 +0900)]
staging: wilc1000: change handle_set_operation_mode's return type to void

When handle_set_operation_mode is called in hostIFthread that is a
kernel thread, it is not checked return type of this function. This
patch changes return type to void and removes braces if statement due to
have a single statement.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: rename result in handle_set_wfi_drv_handler
Chaehyun Lim [Wed, 6 Apr 2016 23:10:40 +0000 (08:10 +0900)]
staging: wilc1000: rename result in handle_set_wfi_drv_handler

This patch renames result to ret that is used to get return value from
wilc_send_config_pkt. Some handle_*() function are used as result,
others are used as ret. It will be changed as ret in all handle_*()
function to match variable name.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: change data type of result in handle_set_wfi_drv_handler
Chaehyun Lim [Wed, 6 Apr 2016 23:10:39 +0000 (08:10 +0900)]
staging: wilc1000: change data type of result in handle_set_wfi_drv_handler

This patch changes data type of result variable from s32 to int.
result is used to get return value from wilc_send_config_pkt that has
return type of int.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: change handle_set_wfi_drv_handler's return type to void
Chaehyun Lim [Wed, 6 Apr 2016 23:10:38 +0000 (08:10 +0900)]
staging: wilc1000: change handle_set_wfi_drv_handler's return type to void

When handle_set_wfi_drv_handler is called in hostIFthread that is a
kernel thread, it is not checked return type of this function. This
patch changes return type to void and removes braces if statement due to
have a single statement.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: change return type of ret variable in handle_get_tx_pwr
Chaehyun Lim [Wed, 6 Apr 2016 23:10:37 +0000 (08:10 +0900)]
staging: wilc1000: change return type of ret variable in handle_get_tx_pwr

This patch changes return type of ret variable from s32 to int.
ret has return value from wilc_send_config_pkt that has return type of
int.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: remove unused hif_drv in wilc_add_beacon
Chaehyun Lim [Tue, 5 Apr 2016 06:38:32 +0000 (15:38 +0900)]
staging: wilc1000: remove unused hif_drv in wilc_add_beacon

This patch removes unused hif_drv in wilc_add_beacon.
There is no need to check null and print debug log.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: remove unused hif_drv in wilc_del_beacon
Chaehyun Lim [Tue, 5 Apr 2016 06:38:31 +0000 (15:38 +0900)]
staging: wilc1000: remove unused hif_drv in wilc_del_beacon

This patch removes unused hif_drv in wilc_del_beacon.
There is no need to check null and print debug log.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: remove unused hif_drv in wilc_set_pmkid_info
Chaehyun Lim [Tue, 5 Apr 2016 06:38:30 +0000 (15:38 +0900)]
staging: wilc1000: remove unused hif_drv in wilc_set_pmkid_info

This patch removes unused hif_drv in wilc_set_pmkid_info.
There is no need to check null and print debug log.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: remove unused hif_drv in host_int_get_assoc_res_info
Chaehyun Lim [Tue, 5 Apr 2016 06:38:29 +0000 (15:38 +0900)]
staging: wilc1000: remove unused hif_drv in host_int_get_assoc_res_info

This patch removes unused hif_drv in host_int_get_assoc_res_info.
There is no need to check null and print debug log.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: remove unused hif_drv in wilc_set_mac_chnl_num
Chaehyun Lim [Tue, 5 Apr 2016 06:38:28 +0000 (15:38 +0900)]
staging: wilc1000: remove unused hif_drv in wilc_set_mac_chnl_num

This patch removes unused hif_drv in wilc_set_mac_chnl_num.
There is no need to check null and print debug log.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: remove unused hif_drv in wilc_remain_on_channel
Chaehyun Lim [Tue, 5 Apr 2016 06:38:27 +0000 (15:38 +0900)]
staging: wilc1000: remove unused hif_drv in wilc_remain_on_channel

This patch removes unused hif_drv in wilc_remain_on_channel.
There is no need to check null and print debug log.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: remove unused hif_drv in wilc_add_station
Chaehyun Lim [Tue, 5 Apr 2016 06:38:26 +0000 (15:38 +0900)]
staging: wilc1000: remove unused hif_drv in wilc_add_station

This patch removes unused hif_drv in wilc_add_station.
There is no need to check null and print debug log.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: remove unused hif_drv in wilc_del_station
Chaehyun Lim [Tue, 5 Apr 2016 06:38:25 +0000 (15:38 +0900)]
staging: wilc1000: remove unused hif_drv in wilc_del_station

This patch removes unused hif_drv in wilc_del_station.
There is no need to check null and print debug log.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: remove unused hif_drv in wilc_del_allstation
Chaehyun Lim [Tue, 5 Apr 2016 06:38:24 +0000 (15:38 +0900)]
staging: wilc1000: remove unused hif_drv in wilc_del_allstation

This patch removes unused hif_drv in wilc_del_allstation.
There is no need to check null and print debug log.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: remove unused hif_drv in wilc_edit_station
Chaehyun Lim [Tue, 5 Apr 2016 06:38:23 +0000 (15:38 +0900)]
staging: wilc1000: remove unused hif_drv in wilc_edit_station

This patch removes unused hif_drv in wilc_edit_station.
There is no need to checku null and print debug log.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: remove unused hif_drv in wilc_set_power_mgmt
Chaehyun Lim [Tue, 5 Apr 2016 06:38:22 +0000 (15:38 +0900)]
staging: wilc1000: remove unused hif_drv in wilc_set_power_mgmt

This patch removes unused hif_drv in wilc_set_power_mgmt.
There is no need to check null and print debug log.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: remove unused hif_drv in wilc_setup_multicast_filter
Chaehyun Lim [Tue, 5 Apr 2016 06:38:21 +0000 (15:38 +0900)]
staging: wilc1000: remove unused hif_drv in wilc_setup_multicast_filter

This patch removes unused hif_drv in wilc_setup_multicast_filter.
There is no need to check null and print debug log.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: remove unused hif_drv in wilc_setup_ipaddress
Chaehyun Lim [Tue, 5 Apr 2016 06:38:20 +0000 (15:38 +0900)]
staging: wilc1000: remove unused hif_drv in wilc_setup_ipaddress

This patch removes unused hif_drv in wilc_setup_ipaddress.
There is no need to check null and print debug log.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: remove unused hif_drv in host_int_get_ipaddress
Chaehyun Lim [Tue, 5 Apr 2016 06:38:19 +0000 (15:38 +0900)]
staging: wilc1000: remove unused hif_drv in host_int_get_ipaddress

This patch removes unused hif_drv in host_int_get_ipaddress.
There is no need to check null and print debug log.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: rename pu8Buffer in handle_scan
Chaehyun Lim [Mon, 4 Apr 2016 11:04:50 +0000 (20:04 +0900)]
staging: wilc1000: rename pu8Buffer in handle_scan

This patch renames pu8Buffer to buffer to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: rename u32WidsCount in handle_scan
Chaehyun Lim [Mon, 4 Apr 2016 11:04:49 +0000 (20:04 +0900)]
staging: wilc1000: rename u32WidsCount in handle_scan

This patch renames u32WidsCount to index to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: rename strWIDList in handle_scan
Chaehyun Lim [Mon, 4 Apr 2016 11:04:48 +0000 (20:04 +0900)]
staging: wilc1000: rename strWIDList in handle_scan

This patch renames strWIDList to wid_list to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: rename pstrHostIFscanAttr in handle_scan
Chaehyun Lim [Mon, 4 Apr 2016 11:04:47 +0000 (20:04 +0900)]
staging: wilc1000: rename pstrHostIFscanAttr in handle_scan

This patch renames pstrHostIFscanAttr to scan_info to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: rename Handle_Scan
Chaehyun Lim [Mon, 4 Apr 2016 11:04:46 +0000 (20:04 +0900)]
staging: wilc1000: rename Handle_Scan

This patch renames Handle_Scan to handle_scan to avoid camelcase.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: remove block scope braces and fix indentation
Chaehyun Lim [Mon, 4 Apr 2016 11:04:45 +0000 (20:04 +0900)]
staging: wilc1000: remove block scope braces and fix indentation

This patch removes unnecessary block scope braces and fix indentation of
the codes.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: move Handle_ScanDone function declaration
Chaehyun Lim [Mon, 4 Apr 2016 11:04:44 +0000 (20:04 +0900)]
staging: wilc1000: move Handle_ScanDone function declaration

Handle_ScanDone function declaration is moved to front of
host_interface.c file.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: rename goto label in handle_cfg_param
Chaehyun Lim [Mon, 4 Apr 2016 11:04:43 +0000 (20:04 +0900)]
staging: wilc1000: rename goto label in handle_cfg_param

This patch changes goto label from ERRORHANDLER to unlock.
unlock is a more meaningful name than ERRORHANDLER.

Signed-off-by: Chaehyun Lim <chaehyun.lim@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: adds a check routine when performed del_key()
Leo Kim [Fri, 1 Apr 2016 08:44:19 +0000 (17:44 +0900)]
staging: wilc1000: adds a check routine when performed del_key()

This patch is adds a check routine when performed del_key().
We was find this situation while test the 'rmmod sdio'.
That is received inform a .del_key cmd from cfg80211.
If is not exist wep keys, must be ignore a wilc_remove_wep_key() function.
Thus, adds a check routine that key length of wep.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8 years agostaging: wilc1000: adds a cfg80211_disconnected() function
Leo Kim [Fri, 1 Apr 2016 08:44:18 +0000 (17:44 +0900)]
staging: wilc1000: adds a cfg80211_disconnected() function

This patch is adds a cfg80211_disconnected() when connection is lost already.
We was find this situation while test the 'rmmod sdio'.
SDIO remove function are include both remove mac_close and unregister net_device.
That is received one more a disconnect cmd from cfg80211.
Driver was already performed disconnect.
If wilc->close value was set to true, adds a call to cfg80211_disconnected().

Signed-off-by: Leo Kim <leo.kim@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>