Commit Graph

455106 Commits

Author SHA1 Message Date
H Hartley Sweeten 952091f123 staging: comedi: addi_common.h: remove ADDIDATA_* defines
These defines don't add any additional clarity to the addi_data drivers.
Just 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>
2014-06-18 14:39:38 -07:00
H Hartley Sweeten c6b004d216 staging: comedi: addi_common.h: remove {LO, HI}WORD macros
These macros don't add any additional clarity to the addi_data drivers.
Just 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>
2014-06-18 14:39:38 -07:00
H Hartley Sweeten 02dc1e78a2 staging: comedi: addi_common.h: remove ADDIDATA_{EN, DIS}ABLE defines
These defines don't add any additional clarity to the addi_data drivers.
Just 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>
2014-06-18 14:39:38 -07:00
H Hartley Sweeten 223a6402c5 staging: comedi: addi_common.h: remove ADDI_{EN, DIS}ABLE defines
These defines don't add any additional clarity to the addi_data drivers.
They are also only used in the addi_apci_3120 driver. Just 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>
2014-06-18 14:39:38 -07:00
H Hartley Sweeten f7f7b10439 staging: comedi: addi_common.h: remove APCI1710_SAVE_INTERRUPT define
This define 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-06-18 14:39:38 -07:00
H Hartley Sweeten 301b1ffcbe staging: comedi: addi_common.h: remove 'b_SingleDiff' from private data
This member is set but never used. Just 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-06-18 14:39:37 -07:00
Ian Abbott 5a07983d8d staging: comedi: ni_daq_700: update driver comment
Reformat the comment describing this comedi driver to use the usual
block comment format.

Also remove reference to digital I/O emulating an 8255, because it
doesn't, and remove "DIO only" from the "Description:" line as it also
supports analog inputs.

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-06-18 14:37:05 -07:00
H Hartley Sweeten 6822fc79a7 staging: comedi: adq12b: tidy up the register map defines
Cleanup the existing defines and add some missing bit defines.

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-06-18 14:34:44 -07:00
H Hartley Sweeten 521a0a6c44 staging: comedi: adq12b: tidy up the subdevice init
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-06-18 14:34:44 -07:00
H Hartley Sweeten 11c4e2db8e staging: comedi: adq12b: remove 's->len_chanlist' init for analog inputs
This driver does not support async commands so the len_chanlist init is
unnecessary. Remove it and allow the core to default the value to '1'.

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-06-18 14:34:44 -07:00
H Hartley Sweeten 9fc4f9f531 staging: comedi: adq12b: remove ADQ12B_SIZE define
This define is only used in the comedi_request_region() call to
specify the I/O resource size. Remove it and just open code the
value.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-18 14:34:44 -07:00
H Hartley Sweeten bc778ef526 staging: comedi: adq12b: remove 'differential' from private data
This member of the private data is only used during the attach to
determine if there are 8 differential or 16 single-ended analog
inputs. Remove the member and use the comedi_devconfig option
directly.

Also, fix the subdev_flags when differential analog inputs 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>
2014-06-18 14:34:44 -07:00
H Hartley Sweeten 16b4775006 staging: comedi: adq12b: remove 'unipolar' from private data
This member of the private data is only used during the attach to
determine which range table to use for the analog inputs. Remove
the member and use the comedi_devconfig option 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>
2014-06-18 14:34:44 -07:00
H Hartley Sweeten d8dc10bf68 staging: comedi: adq12b: tidy up adq12b_ai_rinsn()
For aesthetics, rename this function.

Clean up the local variables by reusing 'val' instead of using
separate variables for the:
  'status' - use once to trigger the first A/D conversion
  'hi' and 'lo' - used to read the A/D conversion result

For aesthetics, change the final return to insn->n and remove the
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>
2014-06-18 14:34:44 -07:00
H Hartley Sweeten f93b399b13 staging: comedi: adq12b: fix ctreg (ai channel/range) programming
This driver only updates the ctreg (ai channel/range) register if the
desired channel or range has changed since the last analog input read
operation. It does this becuase the hardware requires an udelay to
allow the multiplexor to settle. Unfortunatly the current code never
updates the 'last_channel' and 'last_range' in the private data so
the ctreg gets updated every time.

Fix this and simplify it a bit by just storing the last ctreg value
in 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-06-18 14:34:44 -07:00
H Hartley Sweeten d9c4261f6a staging: comedi: ni_mio_common: fix the (*insn_read) for the freq_out counter
The (*insn_read) functions are supposed to "read" insn->n data values and
return the number of values read.

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-06-18 14:33:53 -07:00
H Hartley Sweeten 00a92c03be staging: comedi: ni_mio_common: fix the (*insn_write) for the freq_out counter
The (*insn_write) functions are supposed to write insn->n data values and
return the number of values written. For this subdevice it only makes sense
to write the last data value.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-18 14:33:53 -07:00
H Hartley Sweeten e63dabd00b staging: comedi: ni_mio_common: absorb helpers into ni_freq_out_insn_config()
Absorb the helper functions that handle the INSN_CONFIG_SET_CLOCK_SRC and
INSN_CONFIG_GET_CLOCK_SRC comedi instructions.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-18 14:33:53 -07:00
H Hartley Sweeten e879c315c3 staging: comedi: ni_mio_common: use dev->write_subdev
The (*attach) in ni_E_init() sets the dev->write_subdev to the analog
output subdevice. Use that instead of accessing the dev->subdevices
array directly.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-18 14:33:52 -07:00
H Hartley Sweeten 5dce16e51a staging: comedi: ni_mio_common: use dev->read_subdev
The (*attach) in ni_E_init() sets the dev->read_subdev to the analog
input subdevice. Use that instead of accessing the dev->subdevices
array directly.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-18 14:33:52 -07:00
H Hartley Sweeten 2832b1831c staging: comedi: ni_mio_common: move externally called functions to EOF
This source file is included by the ni_atmio, ni_mio_cs, and ni_pcmio
drivers to support the common hardware on National Instruments DAQ-STC
based boards.

The only functions actually used by the external source files are
ni_E_interrupt(), ni_alloc_private(), ni_E_init(), and mio_common_detach().
The rest of the functions in this file are only used locally.

For aesthetics, move all the externally called functions to the end of
the file.

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-06-18 14:33:52 -07:00
H Hartley Sweeten 849590f759 staging: comedi: ni_mio_common: move disabled GPCT functions
I have not determined if the code in these functions is actually
usable. For now just move the disabled code closer to the working
gpct 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>
2014-06-18 14:33:52 -07:00
H Hartley Sweeten 2ffb247691 staging: comedi: ni_mio_common: remove forward declaration 24
Move some functions to remove the need for the remaining forward declarations.

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-06-18 14:33:52 -07:00
H Hartley Sweeten 624b161f7e staging: comedi: ni_mio_common: remove forward declaration 23
Move ni_set_master_clock() and its helper functions to remove the need
for the forward declaration.

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-06-18 14:33:52 -07:00
H Hartley Sweeten ae43763d34 staging: comedi: ni_mio_common: remove forward declaration 22
Move ni_rtsi_insn_config() and its helper functions to remove the need
for the forward declaration.

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-06-18 14:33:52 -07:00
H Hartley Sweeten 892885eafa staging: comedi: ni_mio_common: remove forward declaration 21
Move ni_rtsi_init() to remove the need for the forward declaration.

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-06-18 14:33:52 -07:00
H Hartley Sweeten 3d129c3e5f staging: comedi: ni_mio_common: remove forward declaration 20
Move ni_ai_insn_read() to remove the need for a forward declaration.

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-06-18 14:33:52 -07:00
H Hartley Sweeten c75527fbf6 staging: comedi: ni_mio_common: remove forward declaration 19
Move ni_E_interrupt() to remove the need for some forward declarations.

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-06-18 14:33:52 -07:00
H Hartley Sweeten 2655c8a1d7 staging: comedi: ni_mio_common: remove forward declaration 18
Move ni_ai_drain_dma() to remove the need for the forward declaration.

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-06-18 14:33:52 -07:00
H Hartley Sweeten f8f6d91d8e staging: comedi: ni_mio_common: remove forward declaration 17
Move the get_last_sample_*() helpers to remove the need for the forward
declarations.

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-06-18 14:33:52 -07:00
H Hartley Sweeten d2a577c022 staging: comedi: ni_mio_common: remove forward declaration 16
Move ni_ai_insn_config() to remove the need for a forward declaration.

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-06-18 14:33:52 -07:00
H Hartley Sweeten 8511b85823 staging: comedi: ni_mio_common: remove forward declaration 15
Move ni_ai_inttrig() to remove the need for the forward declaration.

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-06-18 14:33:51 -07:00
H Hartley Sweeten f8246dfadb staging: comedi: ni_mio_common: remove forward declaration 14
Move shutdown_ai_command() to remove the need for the forward
declaration.

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-06-18 14:33:51 -07:00
H Hartley Sweeten 189e173681 staging: comedi: ni_mio_common: remove forward declaration 13
Move ni_serial_insn_config() to remove the need for some forward
declarations.

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-06-18 14:33:51 -07:00
H Hartley Sweeten fed37a1e70 staging: comedi: ni_mio_common: remove forward declaration 12
Remove the need for the forward declaration of ni_cdio_cancel() by
indirectly calling it using the subdevice (*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>
2014-06-18 14:33:51 -07:00
H Hartley Sweeten 0792928fd6 staging: comedi: ni_mio_common: remove forward declaration 11
Move ni_cdio_cmd() to remove the need for the forward declaration
of ni_cdo_inttrig().

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-06-18 14:33:51 -07:00
H Hartley Sweeten 9a0c81a2be staging: comedi: ni_mio_common: remove forward declaration 10
These forward declarations are not needed.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-18 14:33:51 -07:00
H Hartley Sweeten 12db14163e staging: comedi: ni_mio_common: remove forward declaration 9
Move ni_rtsi_insn_bits() to remove the need for the forward declaration.

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-06-18 14:33:51 -07:00
H Hartley Sweeten 24e7c352ba staging: comedi: ni_mio_common: remove forward declaration 8
Move the cs5529 calibration subdevice functions and helpers to remove
the need for the forward declarations.

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-06-18 14:33:51 -07:00
H Hartley Sweeten 4187a79a84 staging: comedi: ni_mio_common: remove forward declaration 7
Move the programmable function inputs subdevice functions and helpers
to remove the need for the forward declarations.

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-06-18 14:33:51 -07:00
H Hartley Sweeten c8508a1d7b staging: comedi: ni_mio_common: remove forward declaration 6
Move the ni_gpct_cmd() and ni_gpct_cancel() functions to remove the
need for the forward declarations.

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-06-18 14:33:51 -07:00
H Hartley Sweeten 62c2bce022 staging: comedi: ni_mio_common: remove forward declaration 5
Move the calibration subdevice functions and helpers to remove the need
for the forward declarations.

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-06-18 14:33:51 -07:00
H Hartley Sweeten 9e7cb171de staging: comedi: ni_mio_common: remove forward declaration 4
Move the caldac "packbits" callbacks to remove the need for the forward
declarations.

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-06-18 14:33:51 -07:00
H Hartley Sweeten 1e49c5da48 staging: comedi: ni_mio_common: remove forward declaration 3
Move the pwm config functions to remove the need for the forward
declarations.

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-06-18 14:33:51 -07:00
H Hartley Sweeten 36adeee19e staging: comedi: ni_mio_common: remove forward declaration 2
Move the eeprom read functions to remove the need for the forward
declarations.

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-06-18 14:33:50 -07:00
H Hartley Sweeten f5985867ff staging: comedi: ni_mio_common: remove forward declaration 1
Move ni_8255_callback() to remove the need for the forward declaration.

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-06-18 14:33:50 -07:00
Sachin Kamat 806c4879e0 staging: bcm: Remove redundant casting in Bcmchar.c
Casting value returned by kzalloc is useless.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-18 14:09:49 -07:00
Sachin Kamat db5767a3f9 staging: rtl8723au: Remove redundant casting in rtw_mlme.c
Casting value returned by kzalloc is useless.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-18 14:09:49 -07:00
Sachin Kamat 248c959152 staging: rtl8723au: Remove redundant casting in rtw_mlme_ext.c
Casting value returned by kzalloc is useless.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-18 14:09:48 -07:00
Alexey Tulia a06a24d2b7 staging: usbip: fixed a coding-style warning
This fixes the following warning:
	- WARNING: __constant_cpu_to_le32 should be cpu_to_le32

Signed-off-by: Alexey Tulia <alexey.tulia@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-18 14:08:58 -07:00