From: Frank Mori Hess Date: Tue, 1 May 2007 20:15:38 +0000 (+0000) Subject: Don't set EOMEDI_CB_EOBUF event flag in comedi_buf_write_free(), X-Git-Tag: r0_7_74~92 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=9526b73418ef4ec1286d64009aed7e8117ce7c74;p=comedi.git Don't set EOMEDI_CB_EOBUF event flag in comedi_buf_write_free(), since it may be called by user writing into buffer. --- diff --git a/comedi/drivers.c b/comedi/drivers.c index c678a9cd..293fdfc4 100644 --- a/comedi/drivers.c +++ b/comedi/drivers.c @@ -433,7 +433,7 @@ int comedi_buf_alloc(comedi_device *dev, comedi_subdevice *s, { comedi_async *async = s->async; unsigned long adr; - + /* if no change is required, do nothing */ if(async->prealloc_buf && async->prealloc_bufsz == new_size){ return 0; @@ -645,7 +645,6 @@ unsigned comedi_buf_write_free(comedi_async *async, unsigned int nbytes) comedi_buf_munge(async, async->buf_write_count - async->munge_count); if(async->buf_write_ptr >= async->prealloc_bufsz){ async->buf_write_ptr %= async->prealloc_bufsz; - async->events |= COMEDI_CB_EOBUF; } return nbytes; }