From: Frank Mori Hess Date: Sun, 23 Jan 2005 02:45:47 +0000 (+0000) Subject: rename some members of bufinfo struct to make output mmaps X-Git-Tag: r0_7_70~61 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=30c1ac5f2537db4cf82e6b86380d797d71357485;p=comedi.git rename some members of bufinfo struct to make output mmaps workable --- diff --git a/comedi/comedi_fops.c b/comedi/comedi_fops.c index 369218b8..2d889bad 100644 --- a/comedi/comedi_fops.c +++ b/comedi/comedi_fops.c @@ -487,10 +487,10 @@ static int do_bufinfo_ioctl(comedi_device *dev,void *arg) if(!async){ DPRINTK("subdevice does not have async capability\n"); - bi.buf_int_ptr = 0; - bi.buf_user_ptr = 0; - bi.buf_int_count = 0; - bi.buf_user_count = 0; + bi.buf_write_ptr = 0; + bi.buf_read_ptr = 0; + bi.buf_write_count = 0; + bi.buf_read_count = 0; goto copyback; } @@ -510,21 +510,15 @@ static int do_bufinfo_ioctl(comedi_device *dev,void *arg) comedi_buf_write_free(async, bi.bytes_written); } + bi.buf_write_count = async->buf_write_count; + bi.buf_write_ptr = async->buf_write_ptr; + bi.buf_read_count = async->buf_read_count; + bi.buf_read_ptr = async->buf_read_ptr; if(s==dev->read_subdev){ unsigned int n_munge_bytes; - - bi.buf_int_count = async->buf_write_count; - bi.buf_int_ptr = async->buf_write_ptr; - bi.buf_user_count = async->buf_read_count; - bi.buf_user_ptr = async->buf_read_ptr; - - n_munge_bytes = bi.buf_int_count - s->async->munge_count; + + n_munge_bytes = bi.buf_write_count - s->async->munge_count; comedi_buf_munge(dev, s, n_munge_bytes); - }else{ - bi.buf_int_count = async->buf_read_count; - bi.buf_int_ptr = async->buf_read_ptr; - bi.buf_user_count = async->buf_write_count; - bi.buf_user_ptr = async->buf_write_ptr; } copyback: diff --git a/include/linux/comedi.h b/include/linux/comedi.h index f344656c..a22c2b20 100644 --- a/include/linux/comedi.h +++ b/include/linux/comedi.h @@ -389,10 +389,10 @@ struct comedi_bufinfo_struct{ unsigned int subdevice; unsigned int bytes_read; - unsigned int buf_int_ptr; - unsigned int buf_user_ptr; - unsigned int buf_int_count; - unsigned int buf_user_count; + unsigned int buf_write_ptr; + unsigned int buf_read_ptr; + unsigned int buf_write_count; + unsigned int buf_read_count; unsigned int bytes_written;