Commit 47181eab authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

staging: comedi: comedi_buf: remove comedi_buf_write_alloc_strict

This function is only called by comedi_buf_put(). Remove it and just
call __comedi_buf_write_alloc() directly with the strict flag set.
Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f8f76e90
......@@ -194,13 +194,6 @@ unsigned int comedi_buf_write_alloc(struct comedi_async *async,
}
EXPORT_SYMBOL(comedi_buf_write_alloc);
/* allocates nothing unless it can completely fulfill the request */
unsigned int comedi_buf_write_alloc_strict(struct comedi_async *async,
unsigned int nbytes)
{
return __comedi_buf_write_alloc(async, nbytes, 1);
}
/* munging is applied to data by core as it passes between user
* and kernel space */
static unsigned int comedi_buf_munge(struct comedi_async *async,
......@@ -319,7 +312,7 @@ EXPORT_SYMBOL(comedi_buf_read_free);
int comedi_buf_put(struct comedi_async *async, short x)
{
unsigned int n = comedi_buf_write_alloc_strict(async, sizeof(short));
unsigned int n = __comedi_buf_write_alloc(async, sizeof(short), 1);
if (n < sizeof(short)) {
async->events |= COMEDI_CB_ERROR;
......
......@@ -440,8 +440,6 @@ int comedi_buf_get(struct comedi_async *async, short *x);
unsigned int comedi_buf_write_alloc(struct comedi_async *async,
unsigned int nbytes);
unsigned int comedi_buf_write_alloc_strict(struct comedi_async *async,
unsigned int nbytes);
unsigned comedi_buf_write_free(struct comedi_async *async, unsigned int nbytes);
unsigned comedi_buf_read_alloc(struct comedi_async *async, unsigned nbytes);
unsigned comedi_buf_read_free(struct comedi_async *async, unsigned int nbytes);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment