From: Frank Mori Hess Date: Fri, 17 May 2002 00:00:35 +0000 (+0000) Subject: undid some of my wrong changes to try and get analog out working again X-Git-Tag: r0_7_65~31 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=e05809d03d7f9b990aea0955e945da103be9b319;p=comedi.git undid some of my wrong changes to try and get analog out working again --- 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;