From 2825e2b7c922c7cfc556da51e393f4cd61e070cb Mon Sep 17 00:00:00 2001 From: David Schleef Date: Mon, 18 Dec 2000 16:41:55 +0000 Subject: [PATCH] fix in do_cmd_ioctl() --- comedi/comedi_fops.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/comedi/comedi_fops.c b/comedi/comedi_fops.c index a4e81193..2c257d11 100644 --- a/comedi/comedi_fops.c +++ b/comedi/comedi_fops.c @@ -832,10 +832,13 @@ static int do_cmd_ioctl(comedi_device *dev,void *arg,void *file) s->buf_int_ptr=0; s->buf_int_count=0; -if(s->subdev_flags & SDF_READABLE){ - s->buf_user_ptr=0; - s->buf_user_count=0; -} + if(s->subdev_flags & SDF_READABLE){ + s->buf_user_ptr=0; + s->buf_user_count=0; + } + + s->cur_chan = 0; + s->cur_chanlist_len = s->cmd.chanlist_len; s->cb_mask = COMEDI_CB_EOA|COMEDI_CB_BLOCK|COMEDI_CB_ERROR; if(s->cmd.flags & TRIG_WAKE_EOS){ -- 2.26.2