summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorIan Abbott <abbotti@mev.co.uk>2015-03-27 15:13:01 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-04-03 13:11:53 +0200
commitb183a836fe02a59c2b55273655196ba288f3adb7 (patch)
tree2e28d77dabde4062feaebb605b5c235c05000cb3 /include/linux
parentcc64ea4239c354d30f88130ecf5aa81a506b57e3 (diff)
staging: comedi: comedi_fops: eliminate a use of subdevice spin-lock
`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>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions