- 03 Apr, 2015 40 commits
-
-
Ian Abbott authored
As preparation for removal of "comedi_fc.h", replace calls to the `cfc_check_trigger_...` functions from "comedi_fc.h" with the replacement `comedi_check_trigger_...` functions from "../comedidev.h" and remove the inclusion of "comedi_fc.h". 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>
-
Ian Abbott authored
As preparation for removal of "comedi_fc.h", replace calls to the `cfc_check_trigger_...` functions from "comedi_fc.h" with the replacement `comedi_check_trigger_...` functions from "../comedidev.h" and remove the inclusion of "comedi_fc.h". 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>
-
Ian Abbott authored
As preparation for removal of "comedi_fc.h", replace calls to the `cfc_check_trigger_...` functions from "comedi_fc.h" with the replacement `comedi_check_trigger_...` functions from "../comedidev.h" and remove the inclusion of "comedi_fc.h". 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>
-
Ian Abbott authored
As preparation for removal of "comedi_fc.h", replace calls to the `cfc_check_trigger_...` functions from "comedi_fc.h" with the replacement `comedi_check_trigger_...` functions from "../comedidev.h" and remove the inclusion of "comedi_fc.h". 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>
-
Ian Abbott authored
As preparation for removal of "comedi_fc.h", replace calls to the `cfc_check_trigger_...` functions from "comedi_fc.h" with the replacement `comedi_check_trigger_...` functions from "../comedidev.h" and remove the inclusion of "comedi_fc.h". 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>
-
Ian Abbott authored
As preparation for removal of "comedi_fc.h", replace calls to the `cfc_check_trigger_...` functions from "comedi_fc.h" with the replacement `comedi_check_trigger_...` functions from "../comedidev.h" and remove the inclusion of "comedi_fc.h". 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>
-
Ian Abbott authored
As preparation for removal of "comedi_fc.h", replace calls to the `cfc_check_trigger_...` functions from "comedi_fc.h" with the replacement `comedi_check_trigger_...` functions from "../comedidev.h" and remove the inclusion of "comedi_fc.h". 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>
-
Ian Abbott authored
As preparation for removal of "comedi_fc.h", replace calls to the `cfc_check_trigger_...` functions from "comedi_fc.h" with the replacement `comedi_check_trigger_...` functions from "../comedidev.h" and remove the inclusion of "comedi_fc.h". 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>
-
Ian Abbott authored
As preparation for removal of "comedi_fc.h", replace calls to the `cfc_check_trigger_...` functions from "comedi_fc.h" with the replacement `comedi_check_trigger_...` functions from "../comedidev.h" and remove the inclusion of "comedi_fc.h". 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>
-
Ian Abbott authored
As preparation for removal of "comedi_fc.h", replace calls to the `cfc_check_trigger_...` functions from "comedi_fc.h" with the replacement `comedi_check_trigger_...` functions from "../comedidev.h" and remove the inclusion of "comedi_fc.h". 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>
-
Ian Abbott authored
As preparation for removal of "comedi_fc.h", replace calls to the `cfc_check_trigger_...` functions from "comedi_fc.h" with the replacement `comedi_check_trigger_...` functions from "../comedidev.h" and remove the inclusion of "comedi_fc.h". 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>
-
Ian Abbott authored
As preparation for removal of "comedi_fc.h", replace calls to the `cfc_check_trigger_...` functions from "comedi_fc.h" with the replacement `comedi_check_trigger_...` functions from "../comedidev.h" and remove the inclusion of "comedi_fc.h". 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>
-
Ian Abbott authored
As preparation for removal of "comedi_fc.h", replace calls to the `cfc_check_trigger_...` functions from "comedi_fc.h" with the replacement `comedi_check_trigger_...` functions from "../comedidev.h" and remove the inclusion of "comedi_fc.h". 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>
-
Ian Abbott authored
"ni_labpc_isadma.c" doesn't use anything from "comedi_fc.h". 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>
-
Ian Abbott authored
"ni_660x.c" doesn't use anything from "comedi_fc.h". 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>
-
Ian Abbott authored
"mite.c" doesn't use anything from "comedi_fc.h". 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>
-
Ian Abbott authored
"cb_pcidda.c" doesn't use anything from "comedi_fc.h". 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>
-
Ian Abbott authored
"cb_das16_cs.c" doesn't use anything from "comedi_fc.h". 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>
-
Ian Abbott authored
"addi_apci_3501.c" doesn't use anything from "comedi_fc.h". 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>
-
Ian Abbott authored
"addi_apci_1516.c" doesn't use anything from "comedi_fc.h". 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>
-
Ian Abbott authored
"8255.c" doesn't use anything from "comedi_fc.h". 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>
-
Ian Abbott authored
"comedi_fc.h" contains a few inline functions used by the `do_cmdtest` handler functions for comedi subdevices in several low-level comedi drivers for checking asynchronous command trigger sources and arguments. They all use the prefix `cfc_check_trigger_arg`. Copy them over to "../comedidev.h", but change the `cfc_` prefix to `comedi_`. Change the original functions in "comedi_fc.h" into simple wrappers for their replacements. Once the drivers have been changed to call the replacement functions, "comedi_fc.h" can be removed. 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>
-
Ian Abbott authored
Add `#include`s and declare incomplete types to "comedi_internal.h" so that .c files still compile when it is the first file included. 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>
-
Ian Abbott authored
`comedi_event()` is called from low-level drivers to handle comedi asynchronous command event flags. As a safety check, it checks the subdevice's "run" flags to make sure an asynchronous command is running. It can also change the run flags to mark the command as no longer running (possibly also marking it as terminated with an error). Checking the runflags and modifying them involves two uses of the subdevice's spin-lock. It seems better to do it with a single use of the spin-lock. This also avoids possible interactions with `do_become_nonbusy()`. Acquire the subdevice's spin-lock at the start of `comedi_event()` and release it near the end, before a possible call to `kill_fasync()` (but after it's parameter values have been determined). Add and make use of few new inline helper functions: * `__comedi_clear_subdevice_runflags()` -- clears some run flags without using the spin-lock * `__comedi_set_subdevice_runflags()` -- sets some run flags without using the spin-lock * `__comedi_get_subdevice_runflags()` -- a spin-lockless version of `comedi_get_subdevice_runflags() * `__comedi_is_subdevice_running()` -- a spin-lockless version of * `comedi_is_subdevice_running()` 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>
-
Ian Abbott authored
`comedi_event()` is called from low-level drivers to handle comedi asynchronous command event flags. Some events cause waiting tasks to be woken up, and a `SIGIO` signal to be sent via `kill_fasync()`. The signal code is `POLL_OUT` if the subdevice supports commands in the "write" direction, or `POLL_IN` for the "read" direction. If the subdevice supports commands in either direction, it sends two `SIGIO` signals, one with each code. Change that latter case to only send one `SIGIO` signal, using the direction of the current command to determine the signal code. If the `CMDF_WRITE` flag is set in the current command, it's in the "write" direction, otherwise it's in the "read" direction. 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>
-
Ian Abbott authored
`comedi_event()` is called from low-level drivers to handle asynchronous command event flags that are stored in `s->async->events` for subdevice `s`. It normally clears the event flags as well. As a safety check, it does nothing if no asynchronous command is running, but it leaves `s->async->events` unchanged in this case. For additional safety, change it to always clear the event flags to avoid leaving stale event flags set when another asynchronous command is set up. 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>
-
Ian Abbott authored
In places where the `s->async` value has been stored in a local variable, use the variable instead of repeating `s->async`. 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>
-
Ian Abbott authored
Don't use a conditional operator when a simple "not" will do. 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>
-
Ian Abbott authored
`comedi_is_subdevice_in_error()` is only used by `comedi_read()` and `comedi_write()` and is only called (soon) after `comedi_is_subdevice_running()` returns `false` (with extra conditions in the case of `comedi_write()`). `comedi_is_subdevice_running()` and `comedi_get_subdevice_runflags()` both call `comedi_get_subdevice_runflags()` which uses the subdevice's spin-lock. Eliminate one use of the subdevice's spin-lock in `comedi_read()` and `comedi_write()` by calling `comedi_get_subdevice_runflags()` and checking the runflags directly. Add a couple of inline functions to check the runflags: `comedi_is_runflags_running()` and `comedi_is_runflags_in_error()`. These do the same test on runflags as `comedi_is_subdevice_running()` and `comedi_is_subdevice_in_error()` but get passed the runflags value directly. `comedi_is_subdevice_in_error()` is no longer used, so remove it. 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>
-
Ian Abbott authored
`comedi_set_subdevice_runflags()` changes the comedi subdevice's `runflags` member according to a bit-mask and new bit values. It's name might suggest that it only "sets", not "clears". Rename it to `comedi_update_subdevice_runflags()` to avoid confusion. 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>
-
Greg Kroah-Hartman authored
This is done to handle some lustre patches that were made against the wrong kernel branch, which was my fault, as I gave a lecture where I messed things up for the students, it wasn't their fault. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Guillaume Matheron authored
I fixed lines over 80 characters and unnecessary returns Signed-off-by: Guillaume Matheron <guillaume.matheron@ens.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Guillaume Matheron authored
I removed all the 'unneeded space' warnings given by checkpatch.pl Signed-off-by: Guillaume Matheron <guillaume.matheron@ens.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Guillaume Matheron authored
I focused on function declarations (placed return type on the same line as function name), and spaces between function name and parenthesis Signed-off-by: Guillaume Matheron <guillaume.matheron@ens.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Georges-Axel Jaloyan authored
Signed-off-by: Georges-Axel Jaloyan <georges-axel.jaloyan@ens.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Cyrille Ruggero authored
Adding a blank in this file after a declaration as reported by checkpatch.pl. Signed-off-by: Cyrille Ruggero <cyrille.ruggero@ens.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Luca Wehrstedt authored
Replace two occurrences of "+1" with simply "1". Signed-off-by: Luca Wehrstedt <luca.wehrstedt@ens.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Gwendoline Chouasne-Guillon authored
before the arguments of a function Remove unneeded space before the arguments of a function Signed_off_by: Gwendoline Chouasne-guillon <chouasne@ens.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Guillaume Matheron authored
Fixed warnings as reported by checkpatch.pl Also fixed padding before function arguments when needed Signed-off-by: Guillaume Matheron <guillaume.matheron@ens.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Rafaël Bocquet authored
Signed-off-by: Rafaël Bocquet <rafael.bocquet@ens.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-