diff options
author | Ian Abbott <abbotti@mev.co.uk> | 2015-10-09 12:26:49 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-10-13 10:28:40 -0700 |
commit | 432fbde739583140c7ee937910786a9d740804c9 (patch) | |
tree | 3486cf6f9785491067956b219ff1a33dc32344d4 /drivers/staging/comedi/comedi_internal.h | |
parent | 274ec5ee5478f1757ba083e366d9490dfaa6bd2f (diff) |
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>
Diffstat (limited to 'drivers/staging/comedi/comedi_internal.h')
-rw-r--r-- | drivers/staging/comedi/comedi_internal.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/staging/comedi/comedi_internal.h b/drivers/staging/comedi/comedi_internal.h index cd9437f72c35..3f2c88ae6470 100644 --- a/drivers/staging/comedi/comedi_internal.h +++ b/drivers/staging/comedi/comedi_internal.h @@ -31,6 +31,7 @@ void comedi_buf_map_get(struct comedi_buf_map *bm); int comedi_buf_map_put(struct comedi_buf_map *bm); struct comedi_buf_map *comedi_buf_map_from_subdev_get( struct comedi_subdevice *s); +unsigned int comedi_buf_write_n_available(struct comedi_subdevice *s); unsigned int comedi_buf_write_n_allocated(struct comedi_subdevice *s); void comedi_device_cancel_all(struct comedi_device *dev); bool comedi_can_auto_free_spriv(struct comedi_subdevice *s); |