diff options
author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2014-10-22 15:37:18 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-10-29 16:03:16 +0800 |
commit | 0cf5efaa4bca230c7b733694932a4355d94dc5e0 (patch) | |
tree | a5491a5d43f6189ad88560f6ccbd81938671d759 /drivers/staging/comedi/comedi_buf.c | |
parent | e19a3c97242825d7426758bad9e293068adf16ec (diff) | |
download | op-kernel-dev-0cf5efaa4bca230c7b733694932a4355d94dc5e0.zip op-kernel-dev-0cf5efaa4bca230c7b733694932a4355d94dc5e0.tar.gz |
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: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-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.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/drivers/staging/comedi/comedi_buf.c b/drivers/staging/comedi/comedi_buf.c index 23e3bd1..6dd87cb 100644 --- a/drivers/staging/comedi/comedi_buf.c +++ b/drivers/staging/comedi/comedi_buf.c @@ -252,15 +252,15 @@ static unsigned int comedi_buf_write_n_available(struct comedi_subdevice *s) return free_end - async->buf_write_alloc_count; } -static unsigned int __comedi_buf_write_alloc(struct comedi_subdevice *s, - unsigned int nbytes, - int strict) +/* allocates chunk for the writer from free buffer space */ +unsigned int comedi_buf_write_alloc(struct comedi_subdevice *s, + unsigned int nbytes) { struct comedi_async *async = s->async; unsigned int available = comedi_buf_write_n_available(s); if (nbytes > available) - nbytes = strict ? 0 : available; + nbytes = available; async->buf_write_alloc_count += nbytes; @@ -272,13 +272,6 @@ static unsigned int __comedi_buf_write_alloc(struct comedi_subdevice *s, 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); /* |