summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2014-07-16staging: comedi: ni_mio_common: checkpatch.pl cleanup (else not useful)H Hartley Sweeten
Fix the checkpatch.pl warnings: WARNING: else is not generally useful after a break or return Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-16staging: comedi: ni_mio_common: checkpatch.pl cleanup (break not useful)H Hartley Sweeten
Fix the checkpatch.pl warning: WARNING: break is not useful after a goto or return Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-16staging: comedi: s626: checkpatch.pl cleanup (else not useful)H Hartley Sweeten
Fix the checkpatch.pl warning: WARNING: else is not generally useful after a break or return Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-16staging: comedi: ni_660x: checkpatch.pl cleanup (else not useful)H Hartley Sweeten
Fix the checkpatch.pl warning: WARNING: else is not generally useful after a break or return Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-16staging: comedi: ni_660x: checkpatch.pl cleanup (break not useful)H Hartley Sweeten
Fix the checkpatch.pl warnings: WARNING: break is not useful after a goto or return Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-16staging: comedi: cb_pcidas: checkpatch.pl cleanup (break not useful)H Hartley Sweeten
Fix the checkpatch.pl warnings: WARNING: break is not useful after a goto or return Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-16staging: comedi: cb_pcidas64: checkpatch.pl cleanup (break not useful)H Hartley Sweeten
Fix the checkpatch.pl warnings: WARNING: break is not useful after a goto or return Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-16staging: comedi: s526: checkpatch.pl cleanup (break not useful)H Hartley Sweeten
Fix the checkpatch.pl warning: WARNING: break is not useful after a goto or return Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-16staging: comedi: ni_at_a2150: checkpatch.pl cleanup (break not useful)H Hartley Sweeten
Fix the checkpatch.pl warning: WARNING: break is not useful after a goto or return Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-16staging: comedi: das1800: checkpatch.pl cleanup (break not useful)H Hartley Sweeten
Fix the checkpatch.pl warnings: WARNING: break is not useful after a goto or return Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-16staging: comedi: pcl724: checkpatch.pl cleanup (else after return)H Hartley Sweeten
Fix the checkpatch.pl warning: WARNING: else is not generally useful after a break or return Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-16staging: comedi: dt282x: checkpatch.pl cleanup (else after return)H Hartley Sweeten
Fix checkpatch.pl warning: WARNING: else is not generally useful after a break or return Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-16staging: comedi: daqboard2000: checkpatch.pl cleanup (else after return)H Hartley Sweeten
Fix these checkpatch.pl warnings: WARNING: else is not generally useful after a break or return Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-16staging: comedi: cb_pcidas64: checkpatch.pl cleanup (else after return)H Hartley Sweeten
Fix these checkpatch.pl warnings: WARNING: else is not generally useful after a break or return Also, remove an unnecessary trailing ';' at the end of a function. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-16staging: comedi: amplc_pci224: checkpatch.pl cleanup (else after return)H Hartley Sweeten
Fix this checkpatch.pl warning: WARNING: else is not generally useful after a break or return Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-16staging: comedi: amplc_pc236: checkpatch.pl cleanup (else after return)H Hartley Sweeten
Fix these checkpatch.pl warnings: WARNING: else is not generally useful after a break or return Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-16staging: comedi: amplc_dio200_common: checkpatch.pl cleanup (else after return)H Hartley Sweeten
Fix these checkpatch.pl warnings: WARNING: else is not generally useful after a break or return Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-16staging: comedi: addi_apci_3xxx: checkpatch.pl cleanup (else after return)H Hartley Sweeten
Fix the checkpatch.pl warning in this file: WARNING: else is not generally useful after a break or return Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-16staging: comedi: 8255: checkpatch.pl cleanup (else after return)H Hartley Sweeten
Fix the checkpatch.pl warning in this file: WARNING: else is not generally useful after a break or return Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-16staging: comedi: 8255_pci: checkpatch.pl cleanup (else after return)H Hartley Sweeten
Fix the checkpatch.pl warning in this file: WARNING: else is not generally useful after a break or return Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-16Staging: comedi: adl_pci9118: fractured spelling fixedSam Asadi
a fractured spelling in previous style issue fix mended. Signed-off-by: Sam Asadi <asadi.samuel@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-16Staging: comedi: adl_pci9118: a style issue fixedSam Asadi
'quoted string split across lines' warning in checkpatching fixed by group whole string in one line. Signed-off-by: Sam Asadi <asadi.samuel@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-16Staging: vt6655: fix missing blank line after variable declarationIgor Bezukh
Checkpatch fix - Add missing blank line after variable declaration Signed-off-by: Igor Bezukh <igbzkh@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-16staging: vt6556: Replace printk by dev_warnPeter Senna Tschudin
This patch fixes a checkpatch warning by replacing printk by dev_warn. Tested by compilation only. Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-16staging: vt6556: Remove typedefsPeter Senna Tschudin
This patch removes uneeded typedefs reported by chackpatch and removes one enum that is not in use. As checkpatch complained about the typedef and the enum is not being used, this patch removes both typedef and enum. The removed enum from card.h: typedef enum _CARD_PHY_TYPE { PHY_TYPE_AUTO = 0, PHY_TYPE_11B, PHY_TYPE_11G, PHY_TYPE_11A } CARD_PHY_TYPE, *PCARD_PHY_TYPE; The following typedefs were removed, but enums were kept at device.h: typedef enum __device_msg_level typedef enum __DEVICE_NDIS_STATUS Tested by compilation only. Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-16staging: xillybus: fix some coding style errorsVincent Bernat
This includes: - keep "else" on the same line as the closing brace - don't use "else" after "return" - don't issue a message for an out-of-memory error - blank line after a declaration Signed-off-by: Vincent Bernat <vincent@bernat.im> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-16staging: comedi: ni_mio_common: tidy up the frequency output subdevice initH Hartley Sweeten
For aesthetics, add some whitespace to the subdevice init. 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>
2014-07-16staging: comedi: ni_mio_common: tidy up the gpct counter subdevice initH Hartley Sweeten
For aesthetics, add some whitespace to the subdevice init and tidy it up a bit. Unfortunately we can't get rid of the '#ifdef PCIDMA' here yet due to other ifdefery in this file. For now just add the correct test so that the async command support is not hooked up unless we have an IRQ and DMA. 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>
2014-07-16staging: comedi: ni_mio_common: tidy up the PFI subdevice initH Hartley Sweeten
For aesthetics, add some whitespace to the subdevice init and tidy it up a bit. Remove the need for the extra local variable. 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>
2014-07-16staging: comedi: ni_mio_common: tidy up the EEPROM subdevice initH Hartley Sweeten
For aesthetics, add some whitespace to the subdevice init. 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>
2014-07-16staging: comedi: ni_mio_common: tidy up the calibration subdevice initH Hartley Sweeten
For aesthetics, add some whitespace to the subdevice init. Refactor the code so that the common parts of the subdevice are initialized 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>
2014-07-16staging: comedi: ni_mio_common: only reset the ai/ao subdevices if they existH Hartley Sweeten
So of the boards supported by this driver do not have analog inputs and some don't have analog outputs. Move the calls that reset these subdevices during the (*attach) by ni_E_init() so they only happen if the subdevices are present. 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>
2014-07-16staging: comedi: ni_mio_common: init clock dividers early in ni_E_init()H Hartley Sweeten
The init/reset of the hardware is a bit scattered in this function. For aesthetics, move the init of the clock dividers so it happens early and tidy up the code 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>
2014-07-16staging: comedi: ni_mio_common: tidy up the Digital I/O subdevice initH Hartley Sweeten
For aesthetics, add some whitespace to the Digital I/O subdevice init. Only hook up the async command support if we have an irq. 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>
2014-07-16staging: comedi: ni_mio_common: refactor 'num_p0_dio_channels' boardinfoH Hartley Sweeten
All of the board supported by this driver have at least 8 Digital I/O channels. A couple of the PCI boards in ni_pcimio have 32 channels. For aesthetics, change this member of the boardinfo into a bit-field flag, 'has_32dio_chan', and use that when initializing the DIO subdevice to set the number of channels to 32 or 8. 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>
2014-07-16staging: comedi: ni_mio_common: tidy up the Analog Output subdevice initH Hartley Sweeten
For aesthetics, add some whitespace to the Analog Output subdevice init. Also, remove the '#ifdef PCIDMA' here and only hook up the async command support if we have an irq and the board either has a fifo or DMA is supported. The ni_pcimio driver is the only place PCIDMA is defined. That driver is also the only user of ni_mio_common that allocates devpriv->mite. Use that test instead to determine if dma is supported. Move 'is_67xx' check and init_ao_67xx() call into the Analog Output subdevice init. The 67xx boards all have analog outputs and this check does not need to be done for the boards that do not have analog outputs. 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>
2014-07-16staging: comedi: ni_mio_common: tidy up the Analog Input subdevice initH Hartley Sweeten
For aesthetics, add some whitespace to the Analog Input subdevice init. The callers of ni_E_init() do the request_irq() and set dev->irq if the interrupt is available. Only hook up the async command support if we have the irq. Also, remove the '#ifdef PCIDMA' here. The ni_pcimio driver is the only place PCIDMA is defined. That driver is also the only user of ni_mio_common that allocates devpriv->mite. Use that test instead to determine if the subdevice async_dma_dir member needs to be initialized. 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>
2014-07-16staging: comedi: ni_mio_common: (*cancel) only works with async cmd supportH Hartley Sweeten
The comedi subdevice (*cancel) function can only be called by the core if the subdevice supports async commands. Move the initialization of this callback to it is only set if async commands are enabled. 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>
2014-07-16staging: comedi: ni_stc.h: refactor 'aobits' boardinfoH Hartley Sweeten
For aesthetics, change the 'aobits' in the boardinfo to 'ao_maxdata' to remove the need for the calculation of the subdevice '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>
2014-07-16staging: comedi: ni_stc.h: refactor 'adbits' boardinfoH Hartley Sweeten
For aesthetics, change the 'adbits' in the boardinfo to 'ai_maxdata' to remove the need for the calculation of the subdevice '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>
2014-07-16staging: comedi: ni_mio_common: remove unnecessary use of 'board->adbits'H Hartley Sweeten
For aesthetics, use the subdevice 'maxdata' instead of the board 'adbits'. 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>
2014-07-16staging: comedi: ni_mio_common: fix ni_ao_insn_read()H Hartley Sweeten
The comedi core expects (*insn_read) functions to return insn->n data smaples. Fix this function to 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>
2014-07-16staging: comedi: ni_mio_common: remove ai_continuous from private dataH Hartley Sweeten
This member of the private data can be determined by checking the cmd->stop_src. Do that instead and remove the member. 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>
2014-07-16staging: comedi: ni_mio_common: merge analog output (*insn_write) functionsH Hartley Sweeten
Currently the PCI6xxx boards use a different (*insn_write) function for the analog output subdevice. Most of the code is identical to the (*insn_write) used by all the other board types. For aesthetics, merge the two (*insn_write) functions and handle the 'is_6xxx' differences in the common 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>
2014-07-16staging: comedi: ni_mio_common: remove some unnecessary boardinfo accessH Hartley Sweeten
Currently ni_m_series_ao_config_chanlist() gets the boardinfo pointer in order to get the number of analog output channels. Get this from the comedi_subdevice instead. The ni_old_ao_config_chanlist() function also gets the boardinfo pointer to get the analog output resolution, 'aobits', in order to calculate the value needed to convert samples from unsigned to two's complement for bipolar ranges. Use the comedi_subdevice 'maxdata' instead. 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>
2014-07-16staging: comedi: ni_mio_common: remove INSN_CONFIG_ANALOG_TRIG support codeH Hartley Sweeten
None of the boardinfo that uses this code sets the 'has_analog_trig' flag so ni_ai_config_analog_trig() always returns -EINVAL. Also, the private data 'atrig_low', 'atrig_high', and 'atrig_mode' values that are set by ni_ai_config_analog_trig() are never used. Remove the incomplete INSN_CONFIG_ANALOG_TRIG support along with the unused boardinfo and private data members. 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>
2014-07-16staging: comedi: ni_mio_common: tidy up ni_ao_munge()H Hartley Sweeten
Use the bytes_per_sample() helper instead of 'sizeof(short)' to clarify the length calculation. Use comedi_offset_munge() to handle the unsigned to two's complement munge of the data for bipolar ranges. Tidy up the local variables. 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>
2014-07-16staging: comedi: ni_stc.h: add some 'is_{board type}' flags to private dataH Hartley Sweeten
The board->reg_type if checked quite often in the ni_mio_common.c code to handle differences in the PCI devices supported by the ni_pcimio driver. Simplify the code a bit by adding some 'is_{board type}' bit-field flags to the private data. 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>
2014-07-16staging: comedi: ni_mio_common: fix ni_ao_insn_write()H Hartley Sweeten
Comedi (*insn_write) functions are expected to write insn->n values to the hardware. Fix this function to work like the core expects. Also, don't rely on the return value of ni_ao_comfig_chanlist() to determine if the values need converted to two's complement before writing to the hardware. Use the comedi_range_is_bipolar() and comedi_offset_munge() helpers to clarify the 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>
2014-07-16staging: comedi: ni_mio_common: remove ao_win_out() macroH Hartley Sweeten
This marco relies on a local variable having a specific name. Remove the macro and just use ni_ao_win_outw() 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>