staging: comedi: pcl711: put acquired data in buffer for AI command

The asynchronous command support for the AI subdevice is still missing
one crucial element, it doesn't actually put the acquired data in the
buffer so it can be read()!  Call `comedi_buf_put()` from the interrupt
handler to perform this function.  A return value of 0 from
`comedi_buf_put()` means there was no room in the buffer so set the
`COMEDI_CB_OVERFLOW` and `COMEDI_CB_ERROR` event flags in that case.
Otherwise, set the `COMEDI_CB_BLOCK` and `COMEDI_CB_EOS` event flags to
mark the end of a "scan" (the scan length is currently fixed at one
sample in this driver).

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>
1 file changed