staging: comedi: introduce comedi_buf_n_bytes_ready()
Introduce an inline helper to return the number of bytes that are
ready to read from the comedi_async buffer. Use the helper in the
comedi drivers that currently do the calculation as part of the
(*poll) operation.
Also, use the helper in comedi_fops where the calculation is used as
part of the subdevice going nonbusy.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>