summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2014-05-23staging: comedi: pass subdevice to comedi_buf_write_alloc()Ian Abbott
Change the parameters of `comedi_buf_write_alloc()` to pass a pointer to the comedi subdevice instead of a pointer to the "async" structure belonging to the subdevice. The main aim at the moment is to replace all the `struct comedi_async *` parameters with `struct comedi_subdevice *` parameters in the comedi driver API. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-23staging: comedi: ni_tiocmd: pass subdevice to command setup functionsIan Abbott
The `ni_tio_input_cmd()`, `ni_tio_output_cmd()` and `ni_tio_cmd_setup()` functions are called from `ni_tio_cmd()` to set up a comedi command. They currently get passed two parameters, a pointer to a `struct ni_gpct` and a pointer to a `struct comedi_async`, but both of those come from members of a `struct comedi_subdevice` (the former from the `private` member). Replace the parameters with a pointer to the `struct comedi_subdevice`. The main motive is to make the comedi subdevice more easily available to the functions for the use of subsequent patches to remove the `struct comedi_async *` parameters from the comedi buffer handling functions. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-23staging: comedi: pass subdevice to comedi_buf_memcpy_from()Ian Abbott
Change the parameters of `comedi_buf_memcpy_from()` to pass a pointer to the comedi subdevice instead of a pointer to the "async" structure belonging to the subdevice. The main aim at the moment is to replace all the `struct comedi_async *` parameters with `struct comedi_subdevice *` parameters in the comedi driver API. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-23staging: comedi: pass subdevice to comedi_buf_memcpy_to()Ian Abbott
Change the parameters of `comedi_buf_memcpy_to()` to pass a pointer to the comedi subdevice instead of a pointer to the "async" structure belonging to the subdevice. The main aim at the moment is to replace all the `struct comedi_async *` parameters with `struct comedi_subdevice *` parameters in the comedi driver API. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-23staging: comedi: pass subdevice to comedi_buf_get()Ian Abbott
Change the parameters of `comedi_buf_get()` to pass a pointer to the comedi subdevice instead of a pointer to the "async" structure belonging to the subdevice. The function gets a sample value from the comedi buffer, but currently only deals with 16-bit sample types. A future version could deal with 16 or 32-bit sample types depending on the value of the SDF_LSAMPL subdevice flag. The main aim at the moment is to replace all the `struct comedi_async *` parameters with `struct comedi_subdevice *` parameters in the comedi driver API. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-23staging: comedi: pass subdevice to comedi_buf_put()Ian Abbott
Change the parameters of `comedi_buf_put()` to pass a pointer to the comedi subdevice instead of a pointer to the "async" structure belonging to the subdevice. The function puts a sample value in the comedi buffer, but currently only deals with 16-bit sample types. A future version could deal with 16 or 32-bit sample types depending on the value of the SDF_LSAMPL subdevice flag. The main aim at the moment is to replace all the `struct comedi_async *` parameters with `struct comedi_subdevice *` parameters in the comedi driver API. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-23staging: comedi: pcl730: add support for Diamond Systems PC/104 modulesH Hartley Sweeten
The Diamond Systems OPMM-1616-XT board is a PC/104 module with 16 optoisolated inputs and 16 relay outputs. The PEARL-MM-P board is a PC/104 module with 16 relay outputs. Both of these boards can be supported by the pcl730 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>
2014-05-23staging: comedi: amplc_pci224: use comedi_fc helpers to validate timer argsH Hartley Sweeten
Use the comedi_fc helper cfc_check_trigger_arg_is() to validate the scan_begin_arg when the scan_begin_src is TRIG_TIMER. For aesthetics reasons, rename the local variable 'tmp' to 'arg'. 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-05-23staging: comedi: amplc_dio200_common: remove 'continuous' from subdevice ↵H Hartley Sweeten
private data This member of the subdevice private data can be determined from the cmd->stop_src. Do that instead. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-23staging: comedi: adl_pc19111: remove 'chanlist_len' from private dataH Hartley Sweeten
This member of the private data is a copy of the cmd->chanlist_len. Use that 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-05-23staging: comedi: adl_pc19111: rename 'async_cmd' variable in (*do_cmd)H Hartley Sweeten
The comedi_cmd pointer is typically just called 'cmd'. Rename the local variable in pci9111_ai_do_cmd(). 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-05-23staging: comedi: adl_pc19111: remove 'stop_is_none' from private dataH Hartley Sweeten
This member of the private data can be determined by checking the cmd->stop_src. Do that 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-05-23staging: comedi: adl_pci9118: remove 'dmabuf_samples' from private dataH Hartley Sweeten
This member of the private data is set but never used. Remove it. 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-05-23staging: comedi: adl_pci9118: remove 'cnt0_divisor' from private dataH Hartley Sweeten
This member of the private data is not used. Remove it. 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-05-23staging: comedi: adl_pci9118: tidy up start_pacer()H Hartley Sweeten
For aesthetics, rename this function so it has namespace associated with the driver. The divisors used to load the counters are stored in the private data. Get them from there and remove the parameters. 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-05-23staging: comedi: adl_pci9118: tidy up interrupt_pci9118()H Hartley Sweeten
For aesthetics, rename this function so it has namespace associated with the driver. Refactor the function to reduce the indent level and tidy up 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-05-23staging: comedi: adl_pci9118: remove 'int_ai_func' from private dataH Hartley Sweeten
The devpriv->usedma flag can be checked to determine which handler function should be used to transfer the analog input data. Do that instead and remove the member from 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-05-23staging: comedi: adl_pci9118: remove 'ai16bits' from private dataH Hartley Sweeten
This member of the private data is only set when the analog input subdevice maxdata is 0xffff. Just check the s->maxdata and remove the private data 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-05-23staging: comedi: adl_pci9118: remove 'useeoshandle' from private dataH Hartley Sweeten
This member of the private data is always set to 0. Remove it and 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>
2014-05-23staging: comedi: adl_pci9118: remove 'cnt0_users' from private dataH Hartley Sweeten
This member of the private data is set to 0 but never used. Remove it. 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-05-23staging: comedi: adl_pci9118: remove 'valid' from private dataH Hartley Sweeten
This member of the private data is set only used during the (*detach) to check if the board can be reset. The pci9118_reset() function just needs a valid dev->iobase. Use that 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-05-23staging: comedi: adl_pci9118: remove 'ai_buf_ptr' from private dataH Hartley Sweeten
This member of the private data is set to 0 but never used. Remove it. 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-05-23staging: comedi: adl_pci9118: cmd->stop_src == TRIG_INT is not supportedH Hartley Sweeten
The (*do_cmdtest) only allows TRIG_COUNT, TRIG_NONE, or TRIG_EXT as the cmd->stop_src. Remove the disabled 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-05-23staging: comedi: adl_pci9118: remove 'usessh' from private dataH Hartley Sweeten
This member of the private data is only set when the cmd->convert_src is TRIG_NOW. Use that 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-05-23staging: comedi: adl_pci9118: remove 'ai_scans' from private dataH Hartley Sweeten
This member of the private data is just a copy of the cmd->stop_arg. Use that 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-05-23staging: comedi: adl_pci9118: remove 'i8254_osc_base' from private dataH Hartley Sweeten
This member of the private data is always set to I8254_OSC_BASE_4MHZ. Use that 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-05-23staging: comedi: adl_pci9118: remove 'ai_n_scanlen' from private dataH Hartley Sweeten
This member of the private data is just a copy of the cmd->scan_end_arg. Use that 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-05-23staging: comedi: adl_pci9118: remove 'ai_timer2' from private dataH Hartley Sweeten
This member of the private data is set but never used. Remove it. 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-05-23staging: comedi: adl_pci9118: remove 'ai_timer1' from private dataH Hartley Sweeten
This member of the private data is set but never used. Remove it. 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-05-23staging: comedi: adl_pci9118: remove 'ai_data_len' from private dataH Hartley Sweeten
This member of the private data is just a copy of the s->async->prealloc_bufsz. Use that 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-05-23staging: comedi: adl_pci9118: remove 'ai_chanlist' from private dataH Hartley Sweeten
This member of the private data is just a copy of the cmd->chanlist. Use that 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-05-23staging: comedi: adl_pci9118: remove 'ai_n_chan' from private dataH Hartley Sweeten
This member of the private data is just a copy of the cmd->chanlist_len. Use that 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-05-23staging: comedi: addi_apci_1564: call apci1564_interrupt() directlyChase Southwood
Remove the boardinfo about the interrupt function and just call it directly. Signed-off-by: Chase Southwood <chase.southwood@gmail.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-23staging: comedi: addi_apci_1564: absorb apci1564_reset()Chase Southwood
This is the only reset fuction used by this driver. We can remove it from the boardinfo and absorb the code from hwdrv_apci1564.c into the driver. Signed-off-by: Chase Southwood <chase.southwood@gmail.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-23staging: comedi: addi_apci_1564: don't allocate unused subdevicesChase Southwood
The addi-data common code always allocates 7 subdevices. This driver cannot or will not use the ones we are currently allocating for analog input and output or EEPROM, so just don't allocate these subdevices at all. Signed-off-by: Chase Southwood <chase.southwood@gmail.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-23staging: comedi: addi_apci_1564: board has 32 digital outputsChase Southwood
This board always has 32 digital outputs. Remove the test when initializing the subdevice. Also, since this board is the only one supported by this driver, remove the boardinfo about the digital outputs and just use the data directly in the subdevice init. Signed-off-by: Chase Southwood <chase.southwood@gmail.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-23staging/winbond: fix a style errorMichele CURTI
Removed a few spaces to fix style errors Signed-off-by: Michele Curti <michele.curti@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-23staging: winbond: use dev_err() instead of printk()Martin Kepplinger
For obvious error messages, use dev_err() in order to provide userspace with more useful information and use the common kernel coding style. Signed-off-by: Martin Kepplinger <martink@posteo.de> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-23staging: ozwpan: Remove useless return variablesPeter Senna Tschudin
This patch remove variables that are initialized with a constant, are never updated, and are only used as parameter of return. Return the constant instead of using a variable. Verified by compilation only. The coccinelle script that find and fixes this issue is: // <smpl> @@ type T; constant C; identifier ret; @@ - T ret = C; ... when != ret - return ret; + return C; // </smpl> Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-23staging: ozwpan: Add missing blanklines after declarationsJames A Shackleford
Signed-off-by: James A Shackleford <shack@linux.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-23staging: ozwpan: Change MaintainerRupesh Gujare
I will be not able to work on ozwpan driver anymore. Remove my name & add Tateno as maintainer. Signed-off-by: Rupesh Gujare <rupesh.gujare@atmel.com> Acked-by: Shigekatsu Tateno <shigekatsu.tateno@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-23staging: ozwpan: ozproto.c fix for "WARNING: Prefer ether_addr_copy() over ↵Anil Belur
memcpy() if the Ethernet addresses are __aligned(2)" Fixed the warning message by replacing memcpy() with ether_addr_copy() Signed-off-by: Anil Belur <askb23@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-23staging: ozwpan: remove redundant NULL check for devsDaeseok Youn
The "devs" is a pointer to g_net_dev in ozmain.c. g_net_dev has a default value as empty string. So "devs" cannot be NULL, removes NULL check for "devs". Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-23staging: lustre: Use time_before()Manuel Schölling
To be future-proof and for better readability the time comparisons are modified to use time_before() instead of plain, error-prone math. Signed-off-by: Manuel Schölling <manuel.schoelling@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-23staging: lustre: lustre: ptlrpc: sec_config.c: Fix for possible null pointer ↵Rickard Strandqvist
dereference There is otherwise a risk of a possible null pointer dereference. Was largely found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-23staging: lustre: lustre: lov: lov_obd.c: Fix for possible null pointer ↵Rickard Strandqvist
dereference There is otherwise a risk of a possible null pointer dereference. Was largely found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-23staging: lustre: check length of char arrayAndreas Platschek
This fixes the following sparse error: drivers/staging/lustre/lustre/obdclass/llog_ioctl.c:388:39: error: incompatible types for operation (>) drivers/staging/lustre/lustre/obdclass/llog_ioctl.c:388:39: left side has type char *ioc_inlbuf2 drivers/staging/lustre/lustre/obdclass/llog_ioctl.c:388:39: right side has type int Signed-off-by: Andreas Platschek <platschek@ict.tuwien.ac.at> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-23staging: lustre: socklnd: Remove unnecessary return bracketsMasaru Nomura
Remove unnecessary brackets from return statements in socklnd.c, socklnd.h, socklnd_cb.c and socklnd_lib-linux.c to meet kernel coding style. Signed-off-by: Masaru Nomura <massa.nomura@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-23staging: lustre: socklnd: Remove unnecessary line continuationMasaru Nomura
Remove unnecessary line continuation '\' in socklnd.c to meet kernel coding style. Signed-off-by: Masaru Nomura <massa.nomura@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-23staging: lustre: socklnd: Fix indentingMasaru Nomura
Fixed indenting of if statement in socklnd.c to meet kernel coding style. Signed-off-by: Masaru Nomura <massa.nomura@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>