aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/comedi/range.c
AgeCommit message (Collapse)Author
2017-11-28staging: comedi: Remove redundant license textGreg Kroah-Hartman
Now that the SPDX tag is in all comedi files, that identifies the license in a specific and legally-defined manner. So the extra GPL text wording can be removed as it is no longer needed at all. This is done on a quest to remove the 700+ different ways that files in the kernel describe the GPL license text. And there's unneeded stuff like the address (sometimes incorrect) for the FSF which is never needed. No copyright headers or other non-license-description text was removed. Cc: Ian Abbott <abbotti@mev.co.uk> Cc: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-28staging: comedi: add SPDX identifiers to all greybus driver filesGreg Kroah-Hartman
It's good to have SPDX identifiers in all files to make it easier to audit the kernel tree for correct licenses. Update the drivers/staging/comedi files files with the correct SPDX license identifier based on the license text in the file itself. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. This work is based on a script and data from Thomas Gleixner, Philippe Ombredanne, and Kate Stewart. Cc: Ian Abbott <abbotti@mev.co.uk> Cc: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Kate Stewart <kstewart@linuxfoundation.org> Cc: Philippe Ombredanne <pombredanne@nexb.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-08-05staging: comedi: improve comedi_check_chanlist() documentationIan Abbott
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-07staging: comedi: range.c: reformat copyright commentIan Abbott
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-07staging: comedi: range.c: reformat ioctl handler commentIan Abbott
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>
2014-10-20staging: comedi: Remove unecessary function and it's callTapasweni Pathak
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-03-08Staging: comedi: range: remove unnecessary sanity checkFred Akers
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-08Staging: comedi: range: tidy up comedi_check_chanlist()Fred Akers
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>
2013-11-25staging: comedi: range: remove use of DPRINTKH Hartley Sweeten
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-07-25staging: comedi: range: tidy up comedi_check_chanlist()H Hartley Sweeten
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-05-13staging: comedi: remove FSF address from boilerplate textH Hartley Sweeten
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-04-12staging: comedi: use EXPORT_SYMBOL_GPL() for all exported symbolsH Hartley Sweeten
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-05staging: comedi: range: introduce some simple mA rangesH Hartley Sweeten
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-05staging: comedi: range: introduce range_unipolar2_5H Hartley Sweeten
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>
2012-09-05staging: comedi: range: remove subdevice pointer mathH Hartley Sweeten
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-08-16staging: comedi: replace printk calls in comedi coreIan Abbott
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-06-20staging: comedi: rename internal.h to comedi_internal.hIan Abbott
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>
2010-05-11Staging: comedi: range.c: properly mark up __user pointersGreg Kroah-Hartman
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-11Staging: comedi: Moved some EXPORT_SYMBOL() macrosMark Rankilor
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-11Staging: comedi: rename check_chanlist to comedi_check_chanlistGreg Kroah-Hartman
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-11Staging: comedi: more EXPORT_SYMBOL movementGreg Kroah-Hartman
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-11Staging: comedi: fix up coding style issues in range.cGreg Kroah-Hartman
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-05-11Staging: comedi: fix coding style in range.cJohn Sheehan
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>
2009-09-15Staging: Comedi: Lindent changes to comdi driver in staging treeMithlesh Thukral
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-06-19Staging: comedi: remove comedi-specific wrappersGreg Kroah-Hartman
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-19Staging: Comedi: change space indentation to tabsBill Pemberton
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03Staging: comedi: Remove comedi_krange typedefBill Pemberton
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03Staging: comedi: Remove comedi_rangeinfo typedefBill Pemberton
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03Staging: comedi: Remove comedi_lrange typedefBill Pemberton
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03Staging: comedi: Remove comedi_subdevice typedefBill Pemberton
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03Staging: comedi: Remove comedi_device typedefBill Pemberton
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03Staging: comedi: Remove curly braces where they are not neededBill Pemberton
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-03Staging: comedi: Change "foo * bar" to "foo *bar"Bill Pemberton
Removes checkpatch.pl errors Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03Staging: comedi: Convert C99 style comments to traditional style commentsBill Pemberton
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-06Staging: add comedi coreDavid Schleef
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>