Commit Graph

602116 Commits

Author SHA1 Message Date
H Hartley Sweeten
1d1209fea1 staging: comedi: dt2811: tidy up the digital subdevices
Add some whitespace to the digital input and output subdevice
initialization. Reorder the initialization 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>
2016-06-17 20:44:04 -07:00
H Hartley Sweeten
ef0af0ca91 staging: comedi: dt2811: tidy up Timer/Counter register defines
This register currently is not being used. For aesthetics, cleanup the
define and the comment about the frequency control.

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>
2016-06-17 20:44:04 -07:00
H Hartley Sweeten
3d6dc7838c staging: comedi: dt2811: tidy up Digital Input/Output register defines
The digital input and outputs are separate ports even though they share the
same register offset. For aesthetics, define then separately and remove the
redundant information in 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>
2016-06-17 20:44:04 -07:00
H Hartley Sweeten
addb85bd6e staging: comedi: dt2811: tidy up D/A Data register defines
Cleanup the defines for these registers and and remove the redundant
information in 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>
2016-06-17 20:44:04 -07:00
H Hartley Sweeten
d82985fa4c staging: comedi: dt2811: tidy up A/D Data register defines
Cleanup the defines for these registers and and remove the redundant
information in the comment.

Tidy up the reading of the data registers in the (*insn_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>
2016-06-17 20:44:04 -07:00
H Hartley Sweeten
b99c859b8f staging: comedi: dt2811: tidy up A/D Gain/Channel register defines
Cleanup the defines for this register and its bits and remove the
redundant information in the comment.

Make the (*insn_read) use the range to set the gain bits correctly.
Currently the gain is always set 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>
2016-06-17 20:44:04 -07:00
H Hartley Sweeten
022ac95299 staging: comedi: dt2811: tidy up A/D Control/Status register defines
Cleanup the defines for this register and its bits and remove the
redundant information in 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>
2016-06-17 20:44:04 -07:00
H Hartley Sweeten
6e4e38b5e6 staging: comedi: dt2811: remove disabled code
There is no reason the (*attach) should be trying to read an analog
input sample. Remove this 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>
2016-06-17 20:44:04 -07:00
H Hartley Sweeten
a40ff88e58 staging: comedi: dt2811: remove redundant block comment
The configuration options are listed in 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>
2016-06-17 20:44:04 -07:00
H Hartley Sweeten
8a8f5489db staging: comedi: dt2811: tidy up copyright and comedi comments
Fix the checkpatch.pl issue:
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>
2016-06-17 20:44:04 -07:00
Nikita Eshkeev
f7ede00d60 staging:comedi:Use unsigned int instead of unsigned
This patch fixed the checkpatch.pl warning:

WARNING: Prefer 'unsigned int' to bare use of 'unsigned'

Signed-off-by: Nikita Eshkeev <kastolom@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-06-17 20:43:07 -07:00
H Hartley Sweeten
d1aee5dd11 staging: comedi: das16m1: 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>
2016-06-17 20:42:21 -07:00
H Hartley Sweeten
cd99cfbe84 staging: comedi: das16m1: rename struct das16m1_private_struct
For aesthetics, remove the redundant '_struct' suffix.

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>
2016-06-17 20:42:21 -07:00
H Hartley Sweeten
243c701308 staging: comedi: das16m1: convert munge_sample_array() into a subdevice (*munge)
For aesthetics, convert this function into a subdevice (*munge) function and let
the comedi core handle the munging.

Add a comment about why the data needs to be munged.

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>
2016-06-17 20:42:21 -07:00
H Hartley Sweeten
d0e50e6588 staging: comedi: das16m1: minor cleanup to das16m1_ai_insn_read()
The (*insn_read) functions return the number of data values read. The 'n'
value is correct but for clarity change the return to 'insn->n'.

For aesthetics, change the 'n' loop variable name to 'i'. That's more common
in comedi 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>
2016-06-17 20:42:21 -07:00
H Hartley Sweeten
b31cf31264 staging: comedi: das16m1: init local variables when declared
For aesthetics, init the comedi_subdevice, comedi_async, and comedi_cmd
pointers when the local variables are declared.

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>
2016-06-17 20:42:21 -07:00
H Hartley Sweeten
300b31c225 staging: comedi: das16m1: remove an unnecessery comment
The configuration options are listed in 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>
2016-06-17 20:42:21 -07:00
H Hartley Sweeten
4a026c2ebb staging: comedi: das16m1: tidy up misc. defines
For aesthetics, move these after the register map defines and rename
the FIFO_SIZE define.

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>
2016-06-17 20:42:21 -07:00
H Hartley Sweeten
255d302dc8 staging: comedi: das16m1: tidy up 8254/8255 register defines
For aesthetics, rename these 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>
2016-06-17 20:42:21 -07:00
H Hartley Sweeten
702907d7ab staging: comedi: das16m1: tidy up digital output subdevice init
Add some whitespace to the subdevice init and rename the support
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>
2016-06-17 20:42:21 -07:00
H Hartley Sweeten
8500b75c1d staging: comedi: das16m1: tidy up das16m1_di_insn_bits()
The (*insn_bits) for a digital input subdevice only needs to return the
state of the inputs in data[1]. Remove the cruft.

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>
2016-06-17 20:42:21 -07:00
H Hartley Sweeten
fdb68f9abd staging: comedi: das16m1: tidy up digital input subdevice init
Add some whitespace to the subdevice init and rename the support
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>
2016-06-17 20:42:21 -07:00
H Hartley Sweeten
5c8694d699 staging: comedi: das16m1: tidy up analog input subdevice init
Add some whitespace to the subdevice init and rename the 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>
2016-06-17 20:42:21 -07:00
H Hartley Sweeten
a70615894a staging: comedi: das16m1: introduce das16m1_ai_set_queue()
Introduce a helper function to handle writing the channel/gain data to
the queue for single channel reads, (*insn_read), and multi-channel
scans, (*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>
2016-06-17 20:42:21 -07:00
H Hartley Sweeten
c9a050cfbe staging: comedi: das16m1: tidy up queue register defines
Rename these 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>
2016-06-17 20:42:21 -07:00
H Hartley Sweeten
7ca99ee40e staging: comedi: das16m1: tidy up interrupt control register defines
Rename these defines and use the BIT macro to define the bits. Define
some macros for the multi-bit fields in the register.

Rename the private data 'control_state' member to better match the
register name.

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>
2016-06-17 20:42:21 -07:00
H Hartley Sweeten
ceb6a45de2 staging: comedi: das16m1: remove unnecessary ai 'cancel' operations
The comedi core will only call the (*insn_read) and (*do_cmd) functions
if the subdevice is not "busy". All async commands are terminated by
a (*cancel) operation which clears the INTE and PACER_MASK bits in the
interrupt control register. These bits are also cleared when the driver
first attaches. There is no need for the (*insn_read) or (*do_cmd) to
duplicate the 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>
2016-06-17 20:42:21 -07:00
H Hartley Sweeten
6b62e7578b staging: comedi: das16m1: tidy up clear interrupt register define
Rename this define and use a consistent comment throughout 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>
2016-06-17 20:42:21 -07:00
H Hartley Sweeten
4246a637e7 staging: comedi: das16m1: tidy up digital input/output register defines
The digtial inputs and outputs are read/written using the same register
offset but they are different logical registers. Physically they are the
same register with the hi 4 bits returning the inputs and the lo 4 bits
driving the outputs.

For aesthetics, use two different defines for the registers.

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>
2016-06-17 20:42:21 -07:00
H Hartley Sweeten
cec60bf6ce staging: comedi: das16m1: tidy up control/status register defines
Rename the defines for the control/status register/bits. Use the BIT
macro to define the 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>
2016-06-17 20:42:21 -07:00
H Hartley Sweeten
a782a851e3 staging: comedi: das16m1: tidy up analog input data register defines
Convert the inline helper munge_sample() into a macro and rename the
defines for the analog input data register/bits. Use the register define
when accessing this register instead of just dev->iobase.

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>
2016-06-17 20:42:21 -07:00
H Hartley Sweeten
07cbd594f0 staging: comedi: das16m1: tidy up register map comment
The comment about all the registers is not neccessary. The defines
give the same information. This also fixes a checkpatch.pl issue:
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>
2016-06-17 20:42:21 -07:00
H Hartley Sweeten
3cea946df7 staging: comedi: das16m1: remove unnecessary private data comments
These comments are just extra cruft. Removing them also fixes a
checkpatch.pl issue:
WARNING: Block comments use a trailing */ on a separate 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>
2016-06-17 20:42:21 -07:00
H Hartley Sweeten
50ac3ae33b staging: comedi: das16m1: tidy up comment in das16m1_cmd_exec()
Fix the checkpatch.pl issue:
WARNING: Block comments use a trailing */ on a separate 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>
2016-06-17 20:42:21 -07:00
H Hartley Sweeten
27eeef415d staging: comedi: das16m1: tidy up comments in das16m1_handler()
Fix the checkpatch.pl issue:
WARNING: Block comments use a trailing */ on a separate 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>
2016-06-17 20:42:21 -07:00
H Hartley Sweeten
7e573494b8 staging: comedi: das16m1: tidy up copyright and comedi comments
Fix the checkpatch.pl issue:
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>
2016-06-17 20:42:21 -07:00
Oleg Drokin
82ce9365ce staging/lustre/libcfs: Remove "Please contact Oracle" from header
The "Please contact Oracle Corporation" lines are removed since not
only Oracle has nothing to do with Lustre anymore, there's a pointer
to GPL already that's independent of any particular company.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-06-17 20:37:21 -07:00
Oleg Drokin
837e4e6e51 staging/lustre: Remove stray line from selftest/selftest.h
The 'copy of GPLv2]' is an ending from template that's no longer needed,
so remove it to avoid any extra confusion.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-06-17 20:37:21 -07:00
Oleg Drokin
06894eed50 staging/lustre/lov: Fix gpl URL in lov_pool.c
There's no longer a matching sun.com URL, so refer to
gnu.org copy.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-06-17 20:37:21 -07:00
Oleg Drokin
6a5b99a46b staging/lustre: Replace sun.com GPLv2 URL with gnu.org one.
http://www.sun.com/software/products/lustre/docs/GPLv2.pdf is no
longer around, so replae it with (hopefully more permanent)
http://http://www.gnu.org/licenses/gpl-2.0.html

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Reported-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-06-17 20:37:21 -07:00
Oleg Drokin
ed4df35478 staging/lustre: Remove the "Please contact SUN for GPL" from headers
Since SUN is no longer around and there's no point in contacting them,
just remove that whole thing. Copy of GPL is available online anyway
(URLs to be updated in next patch).

This patch was generated with:
find drivers/staging/lustre -name "*.[ch]" -exec perl -0777 -i -pe 's/ \* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,\n \* CA 95054 USA or visit www.sun.com if you need additional information or\n \* have any questions.\n \*\n//igs' {} \;

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Reported-by: Xose Vazquez Perez <xose.vazquez@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-06-17 20:37:21 -07:00
James Simmons
ff13fd40f2 staging: lustre: socklnd: remove typedefs
Remove all remaining typedefs in socklnd driver.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-06-17 20:35:59 -07:00
James Simmons
8d9de3f485 staging: lustre: o2iblnd: remove typedefs
Remove all remaining typedefs in o2iblnd driver.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-06-17 20:35:59 -07:00
Nathaniel Clark
77447a863f staging/lustre/lmv: Fix Multiple Assignments
Fix all multiple assignments on lustre/lmv directory.

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-06-17 20:32:34 -07:00
Nathaniel Clark
3d2b8f5719 staging/lustre/ptlrpc: Fix Multiple Assignments
Fix all multiple assignments on lustre/ptlrpc directory.

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-06-17 20:32:34 -07:00
Nathaniel Clark
89c6036497 staging/lustre/obdclass: Fix Multiple Assignments
Fix all multiple assignments on lustre/obdclass directory.

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-06-17 20:32:34 -07:00
Nathaniel Clark
a3f16d017f staging/lustre/lov: Fix Multiple Assignments
Fix all multiple assignments on lustre/lov directory.

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-06-17 20:32:34 -07:00
Nathaniel Clark
7551b8b5a9 staging/lustre/llite: Fix Multiple Assignments
Fix all multiple assignments on lustre/llite directory.

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-06-17 20:32:34 -07:00
Nathaniel Clark
95c9c00886 staging/lustre/ldlm: Fix Multiple Assignments
Fix all multiple assignments on lustre/ldlm directory.

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-06-17 20:32:34 -07:00
Nathaniel Clark
a30dd801fa staging/lustre/fid: Fix Multiple Assignments
Fix all multiple assignments on lustre/fid directory.

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-06-17 20:32:34 -07:00