diff options
| author | Ian Abbott <[email protected]> | 2015-03-27 15:13:01 +0000 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2015-04-03 13:11:53 +0200 |
| commit | b183a836fe02a59c2b55273655196ba288f3adb7 (patch) | |
| tree | 2e28d77dabde4062feaebb605b5c235c05000cb3 /tools/perf/scripts/python | |
| parent | cc64ea4239c354d30f88130ecf5aa81a506b57e3 (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 <[email protected]>
Reviewed-by: H Hartley Sweeten <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions