aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging/comedi/comedi_buf.c
diff options
context:
space:
mode:
authorH Hartley Sweeten <hsweeten@visionengravers.com>2013-01-09 13:31:46 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-01-17 16:53:59 -0800
commit5b2b64b7510292f4b1e6363edb6f53c39828672e (patch)
tree5970eba1eab7dab5a7fd6947f6236469a908b116 /drivers/staging/comedi/comedi_buf.c
parent3abfa1066b9e98df434868eda9ba91d7012d45c6 (diff)
staging: comedi: comedi_buf: don't expose comedi_buf_read_n_allocated()
This helper function is only called in comedi_buf.c. Move it there and make it static so it's not exposed globally. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/comedi/comedi_buf.c')
-rw-r--r--drivers/staging/comedi/comedi_buf.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/staging/comedi/comedi_buf.c b/drivers/staging/comedi/comedi_buf.c
index 70d29016f8c..891cf89efa9 100644
--- a/drivers/staging/comedi/comedi_buf.c
+++ b/drivers/staging/comedi/comedi_buf.c
@@ -309,6 +309,11 @@ unsigned comedi_buf_read_alloc(struct comedi_async *async, unsigned nbytes)
}
EXPORT_SYMBOL(comedi_buf_read_alloc);
+static unsigned int comedi_buf_read_n_allocated(struct comedi_async *async)
+{
+ return async->buf_read_alloc_count - async->buf_read_count;
+}
+
/* transfers control of a chunk from reader to free buffer space */
unsigned comedi_buf_read_free(struct comedi_async *async, unsigned int nbytes)
{