]> git.baikalelectronics.ru Git - kernel.git/commit
staging: comedi: comedi_buf: make comedi_buf_write_samples() add samples that fit
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Thu, 30 Oct 2014 18:10:50 +0000 (11:10 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 4 Nov 2014 00:11:59 +0000 (16:11 -0800)
commit4efdd2c7bed305eb6f677aa05a63982ca50d4b32
tree0f336e03d1d67ba81120585e0efa15efb4adaef5
parent9458d1a7588b7051f108572c10cc137b56650a58
staging: comedi: comedi_buf: make comedi_buf_write_samples() add samples that fit

This function currently fails if the number of samples to add would
overflow the async buffer. Modify it to add the samples that fit so
at least some of the sample data is returned to the user.

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>
drivers/staging/comedi/comedi_buf.c