1
0
Fork 0
Commit Graph

33 Commits (1dbd0d373ac338903d27fab5204b13122cc5accd)

Author SHA1 Message Date
Ian Abbott d27da4dae5 staging: comedi: improve comedi_check_chanlist() documentation
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>
2015-08-05 11:55:44 -07:00
Ian Abbott 5824ec7fe7 staging: comedi: range.c: reformat copyright comment
Use the usual block comment style.

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>
2015-02-07 17:04:22 +08:00
Ian Abbott 1a4f01b74f staging: comedi: range.c: reformat ioctl handler comment
The unlocked_ioctl handler in "comedi_fops.c" calls a different function
to handle each supported ioctl command code.  Most of these have a block
comment indicating which command code it handles, a brief description,
and an informal description of the inputs and outputs.  These block
comments were formatted in various styles, but have been reformatted to
use the usual block comment style.

The block comment for the handler function for the `COMEDI_RANGEINFO`
ioctl code is in "range.c".  Reformat it to use the usual block command
style to match the others.  Reword it a bit for consistency.

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>
2015-02-07 17:04:22 +08:00
Tapasweni Pathak c6c04f0511 staging: comedi: Remove unecessary function and it's call
Function aref_invalid has unreachable code as it right now
just returns 0 after declaring a variable.
This patch removes this function and it's single call.

As it is static so it's obvious that it is not used anywhere
other than this file or somewhere, where this is included.
I also build tested it.

Signed-off-by: Tapasweni Pathak <tapaswenipathak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-20 10:29:13 +08:00
Fred Akers 56b1fcfdeb Staging: comedi: range: remove unnecessary sanity check
This check is unnecessary because range_table will always be
initialized to range_unknown by comedi_device_postconfig() for
drivers that do not initialize range_table or range_table_list

Signed-off-by: Fred Akers <knivey@botops.net>
Reviewed-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-03-08 18:59:48 -08:00
Fred Akers afdc37ee79 Staging: comedi: range: tidy up comedi_check_chanlist()
Refactor this function to remove an extra indent level

Signed-off-by: Fred Akers <knivey@botops.net>
Reviewed-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-03-08 18:59:48 -08:00
H Hartley Sweeten 2cde476df4 staging: comedi: range: remove use of DPRINTK
Use dev_dbg() instead of the DPRINTK macro to output the comedi
debugging information.

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>
2013-11-25 11:50:53 -08:00
H Hartley Sweeten 065b091270 staging: comedi: range: tidy up comedi_check_chanlist()
The only difference in the if() and else if() check of the chanlist
is the source of the range table length. Consolidate the checks to
make the function a bit more concise.

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>
2013-07-25 13:20:17 -07:00
H Hartley Sweeten 641f064e5d staging: comedi: remove FSF address from boilerplate text
Addresses change...

Remove the paragraph with the FSF address from all the comedi source
files.

Also, remove the paragraph about the finding the complete GPL in the
COPYING file since it's unnecessary.

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>
2013-05-13 17:34:22 -04:00
H Hartley Sweeten 5660e74271 staging: comedi: use EXPORT_SYMBOL_GPL() for all exported symbols
Comedi is licensed under GPL. Some if its exports are currently
EXPORT_SYMBOL() and others are EXPORT_SYMBOL_GPL(). Change them all
to EXPORT_SYMBOL_GPL() and see if anyone reports any fall out.

If any of the symbols "need" to be EXPORT_SYMBOL() they will be
addressed as needed.

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>
2013-04-12 15:09:59 -07:00
H Hartley Sweeten 2c71c4ff57 staging: comedi: range: introduce some simple mA ranges
The simple mA ranges 0 to 20, 4 to 20, and 0 to 32 are fairly common.
Introduce them in the comedi core and use them in the drivers.

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>
2013-04-05 14:13:30 -07:00
H Hartley Sweeten 5f8eb72cef staging: comedi: range: introduce range_unipolar2_5
Introduce a simple unipolar 0 to 2.5 range, range_unipolar2_5, for
use by the comedi drivers.

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>
2013-04-05 14:13:29 -07:00
H Hartley Sweeten d08d6cfe3b staging: comedi: range: remove subdevice pointer math
Convert the comedi_subdevice access from pointer math to array
access.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-05 20:06:32 -07:00
Ian Abbott 4f870fe626 staging: comedi: replace printk calls in comedi core
Replace the printk() calls in the comedi core module with something more
suitable, such as dev_...() or pr_...().  Remove the ones that report a
failure to increment a module count (try_module_get() failure).  Change
the printk() call in the DPRINTK() macro to pr_debug().

TODO: Most of the DPRINTK() calls need to be replaced with something
else.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-08-16 11:35:45 -07:00
Ian Abbott 3a5fa27516 staging: comedi: rename internal.h to comedi_internal.h
Use a less generic name for this internal header file included by
various parts of the comedi core.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-20 12:56:54 -07:00
Greg Kroah-Hartman 3b6b25b5dd Staging: comedi: range.c: properly mark up __user pointers
This is the start of cleaning up the user pointer markings
in the comedi core.

Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-11 11:36:03 -07:00
Mark Rankilor f0f29184d8 Staging: comedi: Moved some EXPORT_SYMBOL() macros
This is a patch to range.c that rearranges some EXPORT_SYMBOL() macros to please
checkpatch.pl

Signed-off-by: Mark Rankilor <reodge@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-11 11:36:01 -07:00
Greg Kroah-Hartman 0fd0ca75fd Staging: comedi: rename check_chanlist to comedi_check_chanlist
It's a global function, so properly name it and move the
export to where the function is located at.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-11 11:36:00 -07:00
Greg Kroah-Hartman e42315177d Staging: comedi: more EXPORT_SYMBOL movement
Move the exports for the variables that are in range.c into the
file itself.  These variables should be prefixed with comedi_ but
that's for a different patch...

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-11 11:36:00 -07:00
Greg Kroah-Hartman ecfe20db3e Staging: comedi: fix up coding style issues in range.c
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-11 11:35:58 -07:00
John Sheehan 1b2e434e1b Staging: comedi: fix coding style in range.c
add missing space before closing brace

Signed-off-by: John Sheehan <john.d.sheehan@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-11 11:35:37 -07:00
Mithlesh Thukral 0a85b6f0ab Staging: Comedi: Lindent changes to comdi driver in staging tree
Lindent changes to comdi driver in staging tree.
This patch is followed by the checkpatch.pl error fixes.
Did not make them part of this patch as the patch size is already huge.

Signed-off-by: Mithlesh Thukral <mithlesh@linsyssoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-09-15 12:01:33 -07:00
Greg Kroah-Hartman 5f74ea14c0 Staging: comedi: remove comedi-specific wrappers
There are a number of comedi "wrappers" for some RT functions that are
about to go away.  This patch removes all of the wrapper calls within
the comedi drivers and core in order to prepare for removing the RT
comedi code.

Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19 11:00:33 -07:00
Bill Pemberton 356cdbcb83 Staging: Comedi: change space indentation to tabs
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-06-19 11:00:31 -07:00
Bill Pemberton 1f6325d629 Staging: comedi: Remove comedi_krange typedef
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:58 -07:00
Bill Pemberton d0a353f637 Staging: comedi: Remove comedi_rangeinfo typedef
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:58 -07:00
Bill Pemberton 9ced1de691 Staging: comedi: Remove comedi_lrange typedef
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:56 -07:00
Bill Pemberton 34c43922e6 Staging: comedi: Remove comedi_subdevice typedef
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:56 -07:00
Bill Pemberton 71b5f4f119 Staging: comedi: Remove comedi_device typedef
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:56 -07:00
Bill Pemberton 82675f3547 Staging: comedi: Remove curly braces where they are not needed
Changes as suggested by checkpatch.pl.

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:54 -07:00
Bill Pemberton e473e9120b Staging: comedi: Change "foo * bar" to "foo *bar"
Removes checkpatch.pl errors

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:53 -07:00
Bill Pemberton b6c777571b Staging: comedi: Convert C99 style comments to traditional style comments
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03 14:53:53 -07:00
David Schleef ed9eccbe89 Staging: add comedi core
This adds the Comedi core to the staging tree.
This is a data acquision infrastructure for Linux, providing a common
interface for these types of drivers.

Taken directly from the comedi git tree, with only minor tweaks
by Greg to get it to build properly within the kernel tree.

From: David Schleef <ds@schleef.org>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Shawn Bohrer <shawn.bohrer@gmail.com>
Signed-off-by: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06 13:52:16 -08:00