提交 0cf5efaa 编写于 作者: H H Hartley Sweeten 提交者: Greg Kroah-Hartman

staging: comedi: comedi_buf: absorb __comedi_buf_write_alloc()

This function is only called by comedi_buf_write_alloc(). Absorb it and remove
the unused 'strict' parameter.
Signed-off-by: NH Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: NIan Abbott <abbotti@mev.co.uk>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 e19a3c97
...@@ -252,15 +252,15 @@ static unsigned int comedi_buf_write_n_available(struct comedi_subdevice *s) ...@@ -252,15 +252,15 @@ static unsigned int comedi_buf_write_n_available(struct comedi_subdevice *s)
return free_end - async->buf_write_alloc_count; return free_end - async->buf_write_alloc_count;
} }
static unsigned int __comedi_buf_write_alloc(struct comedi_subdevice *s, /* allocates chunk for the writer from free buffer space */
unsigned int nbytes, unsigned int comedi_buf_write_alloc(struct comedi_subdevice *s,
int strict) unsigned int nbytes)
{ {
struct comedi_async *async = s->async; struct comedi_async *async = s->async;
unsigned int available = comedi_buf_write_n_available(s); unsigned int available = comedi_buf_write_n_available(s);
if (nbytes > available) if (nbytes > available)
nbytes = strict ? 0 : available; nbytes = available;
async->buf_write_alloc_count += nbytes; async->buf_write_alloc_count += nbytes;
...@@ -272,13 +272,6 @@ static unsigned int __comedi_buf_write_alloc(struct comedi_subdevice *s, ...@@ -272,13 +272,6 @@ static unsigned int __comedi_buf_write_alloc(struct comedi_subdevice *s,
return nbytes; return nbytes;
} }
/* allocates chunk for the writer from free buffer space */
unsigned int comedi_buf_write_alloc(struct comedi_subdevice *s,
unsigned int nbytes)
{
return __comedi_buf_write_alloc(s, nbytes, 0);
}
EXPORT_SYMBOL_GPL(comedi_buf_write_alloc); EXPORT_SYMBOL_GPL(comedi_buf_write_alloc);
/* /*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册