From e05809d03d7f9b990aea0955e945da103be9b319 Mon Sep 17 00:00:00 2001 From: Frank Mori Hess Date: Fri, 17 May 2002 00:00:35 +0000 Subject: [PATCH] undid some of my wrong changes to try and get analog out working again --- comedi/comedi_fops.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/comedi/comedi_fops.c b/comedi/comedi_fops.c index 033945f5..5d691260 100644 --- a/comedi/comedi_fops.c +++ b/comedi/comedi_fops.c @@ -1347,8 +1347,8 @@ static ssize_t comedi_write_v22(struct file *file,const char *buf,size_t nbytes, n=nbytes; - m = async->buf_int_ptr - async->buf_user_ptr; - if( m < 0 ) + m = async->data_len + async->buf_int_count - async->buf_user_count; + if( async->buf_user_ptr + m > async->data_len ) m = async->data_len - async->buf_user_ptr; if(m < n) n = m; -- 2.26.2