From d2f024f3b5ef6be35ab554c0a012ed206ad7ce9e Mon Sep 17 00:00:00 2001 From: Frank Mori Hess Date: Thu, 20 Feb 2003 01:00:33 +0000 Subject: [PATCH] added comedi_buf_read_free() call to comedi_set_user_int_count() --- comedi/kcomedilib/get.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/comedi/kcomedilib/get.c b/comedi/kcomedilib/get.c index 4a93d5fa..c4cb7d4e 100644 --- a/comedi/kcomedilib/get.c +++ b/comedi/kcomedilib/get.c @@ -189,8 +189,12 @@ int comedi_set_user_int_count(comedi_t *d,unsigned int subdevice,unsigned int bu comedi_device *dev = (comedi_device *)d; comedi_subdevice *s = dev->subdevices + subdevice; comedi_async *async; + unsigned int num_bytes; async = s->async; + + num_bytes = buf_user_count - async->buf_read_count; + comedi_buf_read_free( async, num_bytes ); async->buf_read_count = buf_user_count; return 0; -- 2.26.2