summaryrefslogtreecommitdiff
path: root/drivers/staging/comedi/comedi_compat32.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-07-14staging: comedi: fix cast warning in comedi_compat32.cGeliang Tang
This patch fixes the following sparse warning: drivers/staging/comedi/comedi_compat32.c:205:16: warning: cast removes address space of expression Signed-off-by: Geliang Tang <geliangtang@163.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-28staging: comedi: comedi_compat32.c: absorb raw_ioctl()Ian Abbott
`comedi_compat_ioctl()` just calls static inline function `raw_ioctl()` with the same parameters (although the former returns a `long` and the latter returns an `int`). Since `raw_ioctl()` is not called from anywhere else, just absorb its body into `comedi_compat_ioctl()`. 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-01-28staging: comedi: comedi_compat32.c: align some commentsIan Abbott
Align some comments attached to members of the 32-bit compatibility structure definitions. These comments describe the original pointer types that are being represented by a `compat_uptr_t`. 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-01-28staging: comedi: comedi_compat32.c: reformat other block commentsIan Abbott
Use the usual block comment style. Combine some consecutive comments into block comments. Also remove part of a comment referring to `ptr_to_compat()` not being implemented until kernel version 2.6.11 as it's irrelevant. 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-01-28staging: comedi: comedi_compat32.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-01-28staging: comedi: comedi_compat32.c: fix COMEDI_CMD copy backIan Abbott
`do_cmd_ioctl()` in "comedi_fops.c" handles the `COMEDI_CMD` ioctl. This returns `-EAGAIN` if it has copied a modified `struct comedi_cmd` back to user-space. (This occurs when the low-level Comedi driver's `do_cmdtest()` handler returns non-zero to indicate a problem with the contents of the `struct comedi_cmd`, or when the `struct comedi_cmd` has the `CMDF_BOGUS` flag set.) `compat_cmd()` in "comedi_compat32.c" handles the 32-bit compatible version of the `COMEDI_CMD` ioctl. Currently, it never copies a 32-bit compatible version of `struct comedi_cmd` back to user-space, which is at odds with the way the regular `COMEDI_CMD` ioctl is handled. To fix it, change `compat_cmd()` to copy a 32-bit compatible version of the `struct comedi_cmd` back to user-space when the main ioctl handler returns `-EAGAIN`. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-05staging: comedi: add ioctls to set per-file read and write subdeviceIan Abbott
Now that Comedi has the structures in place to support setting the current "read" and/or "write" subdevice on a per-file object basis, add new ioctls to set them. The newly chosen "read" ("write") subdevice needs to support "read" ("write") commands, and the file cannot be busy handling a "read" ("write") command on the previous subdevice (if any). 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-07-18staging: comedi: comedi_compat32: checkpatch.pl --strict cleanupH Hartley Sweeten
Fix the checkpatch.pl --strict issues: CHECK: Logical continuations should be on the previous line 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-10-24file->f_op is never NULL...Al Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
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-01-07staging: comedi: Makefile: conditionally compile multi-file core moduleH Hartley Sweeten
Instead of using the #ifdef'ery in the comedi_compat32.c and proc.c files to include/exclude them from the comedi core, modify the Makefile to include those files automatically when enabled in the .config. 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-11-27staging: comedi: remove unnecessary '#define __NO_VERSION__'H Hartley Sweeten
This define is no longer required for multi-file modules. 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-06-20staging: comedi: shrink comedi_compat32.hIan Abbott
"comedi_compat32.h" #include's <linux/compat.h>, but that is only needed by "comedi_compat32.c" so move the #include to that file. Also, "comedi_compat.h" doesn't really need the '#include <linux/fs.h>' just to declare 'struct file' as it only uses it to construct a pointer to that type. Replace that #include with an incomplete declaration of 'struct file' and move that #include into "comedi_compat32.c". 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-03-03Staging: Cleanup useless headersAlessio Igor Bogani
BKL isn't anymore present into these files thus it is no necessary still include smp_lock.h. Signed-off-by: Alessio Igor Bogani <abogani@texware.it> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-11Staging: comedi: Don't check for -ENOIOCTLCMDShawn Bohrer
unlocked_ioctl() never returns -ENOIOCTLCMD so remove the check. Signed-off-by: Shawn Bohrer <shawn.bohrer@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-11Staging: comedi: remove check for HAVE_COMPAT_IOCTLShawn Bohrer
All new kernels have support for compat_ioctl so remove the check and support for older kernels. Signed-off-by: Shawn Bohrer <shawn.bohrer@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-11staging: comedi: Remove check for HAVE_UNLOCKED_IOCTLShawn Bohrer
All new kernels have unlocked_ioctl so we don't need to check. Signed-off-by: Shawn Bohrer <shawn.bohrer@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-11Staging: comedi: comedi_compat32: Fixed checkpatch.pl issuesShane Warden
Signed-off-by: Shane Warden <shane.warden@onyxneon.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-04-03Staging: comedi: fix 64bit build errorsGreg Kroah-Hartman
This patch fixes the 64bit build errors in the comedi code. Reported-by: Randy Dunlap <randy.dunlap@oracle.com> Cc: Alessio Igor Bogani <abogani@texware.it> 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_insnlist 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_insn 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_cmd typedefBill Pemberton
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03Staging: comedi: Remove lsampl_t and sampl_t typedefsBill Pemberton
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03Staging: comedi: Remove comedi32_chaninfo_struct 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: Add spaces after commas where suggested by checkpatch.plBill 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>