summaryrefslogtreecommitdiff
path: root/tools/perf/scripts
diff options
context:
space:
mode:
authorIan Abbott <abbotti@mev.co.uk>2014-10-30 12:42:31 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-11-03 16:28:47 -0800
commit662c722b645b22782eecdddf324c3a64d303baf3 (patch)
treece907bd525fbef92a1bc0e0fde76c6866a9e3fab /tools/perf/scripts
parentf739850941bc300ed4dc18e22d42cbb670bf69b6 (diff)
staging: comedi: check command direction in poll() file operation
`comedi_poll()` handles the poll() file operation for comedi devices. If no asynchronous command has been set up on the current "read" subdevice, it sets the `POLLIN` and `POLLRDNORM` bits in the return value to indicate that the read() file operation would not block as it would return an error. Add a check so it also does that if the asynchronous command has been set up in the "write" direction as that also causes the read() file operation to return an error. Similarly, if no asynchronous command has need set up on the current "write" subdevice, it sets the `POLLOUT` and `POLLWRNORM` bits in the return value to indicate that the write() file operation would not block as it would return an error. Add a check so it also does that if the asynchronous command has been set up in the "read" direction as that also causes the write() file operation to return an error. 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 'tools/perf/scripts')
0 files changed, 0 insertions, 0 deletions