[PATCH] staging: comedi: comedi_buf: make comedi_buf_write_samples() add samples that fit

Ian Abbott abbotti at mev.co.uk
Fri Oct 31 09:54:40 UTC 2014


On 30/10/14 18:10, H Hartley Sweeten wrote:
> 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 at visionengravers.com>
> Cc: Ian Abbott <abbotti at mev.co.uk>
> Cc: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
> ---
>   drivers/staging/comedi/comedi_buf.c | 8 ++++++--
>   1 file changed, 6 insertions(+), 2 deletions(-)

Reviewed-by: Ian Abbott <abbotti at mev.co.uk>

-- 
-=( Ian Abbott @ MEV Ltd.    E-mail: <abbotti at mev.co.uk> )=-
-=(                          Web: http://www.mev.co.uk/  )=-


More information about the devel mailing list