summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2015-01-25staging: fbtft: fix allyesconfig buildDan Carpenter
There are two functions call reset() so the allyesconfig breaks. Let's make this one static. Reported-by: Jim Davis <jim.epost@gmail.com> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Tested-by: Jim Davis <jim.epost@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-25staging: lustre: ptlrpc: fix lproc_ptlrpc static declarationsJon Bernard
This patch fixes the following sparse warnings: drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c:51:3:warning: symbol 'll_rpc_opcode_table' was not declared. Should it be static? drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c:142:3: warning: symbol 'll_eopcode_table' was not declared. Should it be static? drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c:178:12: warning: symbol 'll_eopcode2str' was not declared. Should it be static? drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c:731:1: warning: symbol 'ptlrpc_lprocfs_svc_req_history_seek' was not declared. Should it be static? Signed-off-by: Jon Bernard <jbernard@tuxion.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-25staging: lustre: remove the CFS_HOP() macroDan Carpenter
CFS_HOP() is a terrible macro. It chops the struct member name in half so that it's not possible to use tools like grep or to search for how a function pointer is used. I removed a couple calls to: LASSERT(CFS_HOP(hs, put_locked) != NULL); because they isn't a need for them. Anyway dereferencing a NULL pointer generates a pretty good stack trace already without adding extra debug code. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-25staging: lustre: fix sparse warnings related to lock context imbalanceLoic Pefferkorn
Applies against next-20150120. Add __acquires() and __releases() function annotations, to fix sparse warnings related to lock context imbalance. This patch fixes the following warnings: drivers/staging/lustre//lustre/libcfs/linux/linux-tracefile.c:153:5: warning: context imbalance in 'cfs_trace_lock_tcd' - wrong count at exit drivers/staging/lustre//lustre/libcfs/linux/linux-tracefile.c:171:39: warning: context imbalance in 'cfs_trace_unlock_tcd' - unexpected unlock drivers/staging/lustre//lustre/libcfs/hash.c:128:1: warning: context imbalance in 'cfs_hash_spin_lock' - wrong count at exit drivers/staging/lustre//lustre/libcfs/hash.c:134:1: warning: context imbalance in 'cfs_hash_spin_unlock' - unexpected unlock drivers/staging/lustre//lustre/libcfs/hash.c:142:9: warning: context imbalance in 'cfs_hash_rw_lock' - wrong count at exit include/linux/rwlock_api_smp.h:219:9: warning: context imbalance in 'cfs_hash_rw_unlock' - unexpected unlock drivers/staging/lustre//lustre/obdclass/cl_object.c:195:6: warning: context imbalance in 'cl_object_attr_lock' - wrong count at exit drivers/staging/lustre//lustre/obdclass/cl_object.c:204:6: warning: context imbalance in 'cl_object_attr_unlock' - unexpected unlock Signed-off-by: Loic Pefferkorn <loic@loicp.eu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-25staging: lustre: lnet: declare internal symbols as staticLuca Ceresoli
Fixes sparse warnings like: warning: symbol '...' was not declared. Should it be static? Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net> Cc: Peng Tao <bergwolf@gmail.com> Cc: Jinshan Xiong <jinshan.xiong@intel.com> Cc: Srikrishan Malik <srikrishanmalik@gmail.com> Cc: HPDD-discuss@lists.01.org Cc: devel@driverdev.osuosl.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-25staging: lustre: fld: declare internal symbols as staticLuca Ceresoli
Fixes sparse warnings like: warning: symbol '...' was not declared. Should it be static? Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net> Cc: Peng Tao <bergwolf@gmail.com> Cc: Jinshan Xiong <jinshan.xiong@intel.com> Cc: Srikrishan Malik <srikrishanmalik@gmail.com> Cc: HPDD-discuss@lists.01.org Cc: devel@driverdev.osuosl.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-25staging: lustre: llite: declare internal symbols as staticLuca Ceresoli
Fixes sparse warnings like: warning: symbol '...' was not declared. Should it be static? Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net> Cc: Peng Tao <bergwolf@gmail.com> Cc: Jinshan Xiong <jinshan.xiong@intel.com> Cc: Srikrishan Malik <srikrishanmalik@gmail.com> Cc: HPDD-discuss@lists.01.org Cc: devel@driverdev.osuosl.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-25staging: lustre: libcfs: declare internal symbols as staticLuca Ceresoli
Fixes sparse warnings like: warning: symbol '...' was not declared. Should it be static? Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net> Cc: Peng Tao <bergwolf@gmail.com> Cc: Jinshan Xiong <jinshan.xiong@intel.com> Cc: Srikrishan Malik <srikrishanmalik@gmail.com> Cc: HPDD-discuss@lists.01.org Cc: devel@driverdev.osuosl.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-25staging: lustre: lmv: declare internal symbols as staticLuca Ceresoli
Fixes sparse warnings like: warning: symbol '...' was not declared. Should it be static? Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net> Cc: Peng Tao <bergwolf@gmail.com> Cc: Jinshan Xiong <jinshan.xiong@intel.com> Cc: Srikrishan Malik <srikrishanmalik@gmail.com> Cc: HPDD-discuss@lists.01.org Cc: devel@driverdev.osuosl.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-25staging: lustre: mdc: declare internal symbols as staticLuca Ceresoli
Fixes sparse warnings like: warning: symbol '...' was not declared. Should it be static? Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net> Cc: Peng Tao <bergwolf@gmail.com> Cc: Jinshan Xiong <jinshan.xiong@intel.com> Cc: Srikrishan Malik <srikrishanmalik@gmail.com> Cc: HPDD-discuss@lists.01.org Cc: devel@driverdev.osuosl.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-25staging: lustre: fix min() comparison types lacks cast build warningJeremiah Mahler
Recent changes to use the builtin min functions [1] introduced type checking which wasn't present before. This resulted in "comparision of distinct pointer types lacks a cast" build warnings on non X86 architectures [2,3]. [1]: https://lkml.org/lkml/2014/12/25/145 [2]: https://lists.01.org/pipermail/kbuild-all/2015-January/008588.html [3]: https://lists.01.org/pipermail/kbuild-all/2015-January/008589.html The call to min() which resulted in this warning took the result of kiblnd_rd_frag_size(), which returned a __u32, and the variable 'resid', which is an int. 'resid' is inside a while loop which is only entered if it is positive. Casting it as a __u32 can be perormed without a loss of data or change in functionality. Fix the warning by casting 'resid' as a __u32. Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Jeremiah Mahler <jmmahler@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-25staging: lustre: remove kmalloc from fld_proc_hash_seq_writeTristan Lelong
This patch simplifies the fld_proc_hash_seq_write function by removing the dynamic memory allocation. The longest fh_name used so far in lustre is 4 characters. We use a 8 bytes variable to be on the safe side. Signed-off-by: Tristan Lelong <tristan@lelong.xyz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-25Staging: comedi: fix line over 80 characters warningjitendra kumar khasdev
This is patch to file jr3_pci.h that fix up warning line over 80 character which is found by checkpatch tool. Signed-off-by: Jitendra Kumar Khasdev <jkhasdev@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-25staging: comedi: vmk80xx: tidy up vmk80xx_cnt_insn_config()H Hartley Sweeten
Tidy up this (*insn_config) function to follow the normal format in comedi drivers. INSN_CONFIG_RESET instructions do not have any extra parameters (insn->n is always 1) so the for loop used to write the packet doesn't make any sense. Remove it and just write the single packet. 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>
2015-01-25staging: comedi: vmk80xx: GPCT_RESET is not an (*insn_config) instructionH Hartley Sweeten
The data[0] parameter to (*insn_config) functions is the "configuration instruction" that should be handled. These are defined by the enum configuration_ids in comedi.h. This driver is currently checking the data[0] value to be INSN_CONFIG_RESET or GPCT_RESET in order to reset a counter channel. GPCT_RESET is defined as 0x0001 which would match the configuration instruction INSN_CONFIG_DIO_OUTPUT. That doesn't make any sense for a counter. Remove GPCT_RESET from the insn_cmd 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>
2015-01-25staging: comedi: ni_labpc_common: use the cfc_check_trigger_arg_*() helpersH Hartley Sweeten
For aesthetics, use the helper functions to check the min/max divisor values. Remove the const int local variables and open code the values. 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>
2015-01-25staging: comedi: ni_labpc_common: use DIV_ROUND_CLOSEST to round divisor valuesH Hartley Sweeten
Use the DIV_ROUND_CLOSEST macro to clarify the (((x) + ((divisor) / 2)) / (divisor)) calculations. 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>
2015-01-25staging: comedi: ni_labpc_common: use DIV_ROUND_UP to round divisor valuesH Hartley Sweeten
Use the DIV_ROUND_UP macro to clarify the (((n) + (d) - 1) / (d)) calculations. 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>
2015-01-25staging: comedi: ni_labpc: remove unnecessary private data validationH Hartley Sweeten
The labpc_free_dma_chan() function validates the private data. Remove the unnecessary validation in labpc_datach(). 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>
2015-01-25staging: comedi: ni_labpc_cs: remove unnecessary includesH Hartley Sweeten
This driver includes a number of unnecessary headers. 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>
2015-01-25staging: comedi: ni_labpc_common: move comedi_alloc_devpriv() to common codeH Hartley Sweeten
The ni_labpc_common module is used by the ni_labpc, ni_labpc_pci, and ni_labpc_cs drivers to provide the common code support. Those drivers currently all call comedi_alloc_devpriv() to allocate the private data before calling the common attach function. For aesthetics, move the private data allocation into 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>
2015-01-25staging: comedi: adv_pci1710: absorb move_block_from_fifo()H Hartley Sweeten
This function is only called by pci1710_handle_fifo(). Absorb it and clean up pci1710_handle_fifo(). 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>
2015-01-25staging: comedi: adv_pci1710: transfer all ai samples in one stepH Hartley Sweeten
The two step process to transfer the ai samples in pci1710_handle_fifo() doesn't make any sense. If the async buffer does not have enough room for the samples the core will set the async event COMEDI_CB_OVERFLOW which will cause the async command to cancel. Splitting the transfer doesn't add any value. Transfer all the samples in one step to simplify 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>
2015-01-25staging: comedi: adv_pci1710: remove 'turn' param from move_block_from_fifo()H Hartley Sweeten
This parameter is not used in the function. It was only used in some debug messages that were previously removed. Remove the parameter. 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>
2015-01-25staging: comedi: adv_pci1710: do comedi_handle_events() in common code patchH Hartley Sweeten
The pci1710_handle_every_sample() and pci1710_handle_fifo() helpers, called by the interrupt handler, both have multiple comedi_handle_events() calls. Remove these and just do a single comedi_handle_events() at the end of the interrupt handler. 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>
2015-01-25staging: comedi: adv_pci1710: introduce pci171x_ai_read_sample()H Hartley Sweeten
Introduce a helper function to read an analog input sample, check for channel dropout, and mask the sample to the maxdata of 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>
2015-01-25staging: comedi: adv_pci1710: tidy up setup_channel_list()H Hartley Sweeten
Rename this function so it has namespace associated with the driver. Tidy up the code to clarify the function. Remove the unnecessary static const array muxonechan[]. 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>
2015-01-25staging: comedi: adv_pci1710: clarify the 'act_chanlist'H Hartley Sweeten
This driver saves the channel list of a scan in the private data and uses that list to check analog input samples for data dropout. Currently the channel numbers are shifted 12 bits so that they match the channel number in the samples that are read from the board. All of the shifts make the driver a bit harder to follow. Store the channel numbers directly to the 'act_chanlist' and shift the sample value instead when checking for the dropout. Add a comment for clarity. 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>
2015-01-25staging: comedi: adv_pci1710: refactor boardinfo 'cardtype'H Hartley Sweeten
The 'cardtype' in the boardinfo is only used to: 1) determine if the board is a pci1720 during the attach of the driver and when reseting the board 2) determine is the board is not a pci1713 when checking for analog input data dropout There is also an unnecessary use of the 'cardtype' when canceling an analog input async command. Remove the 'cardtype' member and add two bit-field flags, 'is_pci1713' and 'is_pci1720'. Refactor the driver to use the new flags. Remove the unnecessary cardtype handling in pci171x_ai_cancel(). 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>
2015-01-25staging: comedi: adv_pci1710: remove boardinfo 'rangelist_ao'H Hartley Sweeten
This boardinfo is not necessary. All the boards with analog outputs have the same range options except for the pci1720 board. That board type is already handled specially during the driver attach. Remove the boardinfo and add the subdevice range_table initialization in the cardtype switch. Rename the range tables to clarify that they are "analog output" ranges. 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>
2015-01-25staging: comedi: adv_pci1710: update the MODULE_DESCRIPTIONH Hartley Sweeten
Change the MODULE_DESCRIPTION to something more useful 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>
2015-01-25staging: comedi: adv_pci1710: remove function separation commentsH Hartley Sweeten
Remove the remaining, unnecessary, function separation comments. 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>
2015-01-25staging: comedi: adv_pci1710: rename 'this_board' local variablesH Hartley Sweeten
For aesthetics, rename all the 'this_board' local variables to simply 'board'. That's more common in comed 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>
2015-01-25staging: comedi: adv_pci1710: tidy up analog input subdevice initH Hartley Sweeten
For aesthetics, add some whitespace to the analog input subdevice init and rename the (*insn_read) support function. Also remove the unnecessary comments. 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>
2015-01-25staging: comedi: adv_pci1710: tidy up analog output subdevice initH Hartley Sweeten
For aesthetics, add some whitespace to the analog output 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>
2015-01-25staging: comedi: adv_pci1710: tidy up digital input and output subdevice initH Hartley Sweeten
For aesthetics, add some whitespace to the digital input and output subdevice init and rename the support functions. Also remove the unnecessary comment. 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>
2015-01-25staging: comedi: adv_pci1710: tidy up counter subdevice initH Hartley Sweeten
For aesthetics, add some whitespace to the counter subdevice init and rename the support functions. Also remove the unnecessary comments. 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>
2015-01-25staging: comedi: adv_pci1710: tidy up pci171x_insn_write_ao()H Hartley Sweeten
For aesthetics, rename this function and tidy it up. 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>
2015-01-25staging: comedi: adv_pci1710: tidy up pci1720_insn_write_ao()H Hartley Sweeten
For aesthetics, rename this function and tidy it up. 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>
2015-01-25staging: comedi: adv_pci1710: use comedi_subdevice 'readback'H Hartley Sweeten
Use the new comedi_subdevice 'readback' member and the core provided (*insn_read) for the readback of the analog output subdevice channels. The board is "reset" prior to the subdevice init. Part of this reset sets all the analog output channels to 0V. Move the initialization of the 'readback' values after the 'readback' member has been allocated. 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>
2015-01-25staging: comedi: adv_pci1710: change boardinfo 'n_aochan' to 'has_ao'H Hartley Sweeten
Some of the boards supported by this driver have analog outputs. The pci1720 board has 4 analog output channels and the others have 2. For aesthetics, change the 'n_aochan' member to a bit-field flag 'has_ao' and refactor the board attach accordingly. Remove the unnecessary initialization of the subdevice 'len_chanlist'. That member is only used by subdevices that support async commands. Also, remove the unnecessary 'number of channels' check in pci171x_reset(). The boards that used this function, and have analog outputs, always have 2 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>
2015-01-25staging: comedi: adv_pci1710: change boardinfo 'fifo_half_size' to ↵H Hartley Sweeten
'has_large_fifo' The boards supported by this driver have a 4K or 1K FIFO that is used when reading analog input samples when running an async command. The maximum number of samples in the FIFO is half the FIFO size due to the 2 bytes/sample (12-bit resolution). For aesthetics, change the 'fifo_half_size' member to a bit-field flag 'has_large_fifo' and add a new member to the private data to hold the 'max_samples' available in the FIFO. Refactor the board attach and pci1710_handle_fifo() accordingly. 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>
2015-01-25staging: comedi: adv_pci1710: remove boardinfo 'ai_ns_min'H Hartley Sweeten
The minimum analog input conversion time is 10000 ns for all board types. Remove this unnecessary 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>
2015-01-25staging: comedi: adv_pci1710: change boardinfo 'n_aichand' to 'has_diff_ai'H Hartley Sweeten
The 'n_aichand' member of the boardinfo is actually a flag indicating that the board supports differential analog inputs. The number of channels is always half the single-ended number of channels. For aesthetics, change the 'n_aichand' member to a bit-field flag 'has_diff_ai'. 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>
2015-01-25staging: comedi: adv_pci1710: remove boardinfo 'ao_maxdata'H Hartley Sweeten
The analog output resolution is always 12-bits in this driver. Remove the unnecessary 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>
2015-01-25staging: comedi: adv_pci1710: remove boardinfo 'ai_maxdata'H Hartley Sweeten
The analog input resolution is always 12-bits in this driver. Remove the unnecessary 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>
2015-01-25staging: comedi: adv_pci1710: rename boardinfo 'have_irq'H Hartley Sweeten
For aesthetics, rename this member of the boardinfo to 'has_irq' and change it to a bit-field 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>
2015-01-25staging: comedi: adv_pci1710: simplify digital input and output boardinfoH Hartley Sweeten
The boards that have digital inputs and outputs always have 16 input channels and 16 output channels. Replace the 'n_dichan' and 'n_dochan' members of the boardinfo with the fit-field flag 'has_di_do' and refactor the board attach accordingly. Remove the unnecessary initialization of the subdevice 'len_chanlist'. That member is only used by subdevices that support async commands. 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>
2015-01-25staging: comedi: adv_pci1710: change boardinfo 'n_counter' to 'has_counter'H Hartley Sweeten
The 'n_counter' member of the boardinfo is actually a flag indicating that the board exposes a single channel counter subdevice. For aesthetics, change the 'n_counter' member to a bit-field flag 'has_counter' and refactor the board attach accordingly. Remove the unnecessary initialization of the subdevice 'len_chanlist'. That member is only used by subdevices that support async commands. 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>
2015-01-25staging: comedi: pcl818: introduce pcl818_ai_write_sample()H Hartley Sweeten
This driver can acquire analog input samples during the async command with DMA, by using the FIFO, or sample-by-sample using the End-Of-Conversion interrupt. All three methods do the following sequence: 1) check for channel dropout 2) add the sample to the async buffer 3) advance the channel dropout detection and detect the end of the command Merge this sequence into a new helper 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>