staging: comedi: add new comedi_buf_write_n_available()
authorIan Abbott <abbotti@mev.co.uk>
Fri, 9 Oct 2015 11:26:49 +0000 (12:26 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 13 Oct 2015 17:28:40 +0000 (10:28 -0700)
commit432fbde739583140c7ee937910786a9d740804c9
tree3486cf6f9785491067956b219ff1a33dc32344d4
parent274ec5ee5478f1757ba083e366d9490dfaa6bd2f
staging: comedi: add new comedi_buf_write_n_available()

Add a new function `comedi_buf_write_n_available()` to return the amount
of buffer space available for writing, including space already allocated
by `comedi_buf_write_alloc()` plus any unallocated space available.
This is currently just for internal use by the comedi core, so is not
exported.

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>
drivers/staging/comedi/comedi_buf.c
drivers/staging/comedi/comedi_internal.h