From: Frank Mori Hess Date: Thu, 22 Nov 2001 01:09:56 +0000 (+0000) Subject: removed async.cur_chanlist_len X-Git-Tag: r0_7_62~100 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=b44050b7070c80b99cc0805147945a8dcfe06846;p=comedi.git removed async.cur_chanlist_len --- diff --git a/comedi/comedi_fops.c b/comedi/comedi_fops.c index 3289df9c..282ffc1a 100644 --- a/comedi/comedi_fops.c +++ b/comedi/comedi_fops.c @@ -916,7 +916,6 @@ static int do_cmd_ioctl(comedi_device *dev,void *arg,void *file) } async->cur_chan = 0; - async->cur_chanlist_len = async->cmd.chanlist_len; async->cb_mask = COMEDI_CB_EOA|COMEDI_CB_BLOCK|COMEDI_CB_ERROR; if(async->cmd.flags & TRIG_WAKE_EOS){ diff --git a/comedi/drivers/ni_atmio16d.c b/comedi/drivers/ni_atmio16d.c index 4943c0c7..c87c6d48 100644 --- a/comedi/drivers/ni_atmio16d.c +++ b/comedi/drivers/ni_atmio16d.c @@ -275,7 +275,7 @@ static void atmio16d_interrupt(int irq, void *d, struct pt_regs *regs) s->async->buf_int_ptr += sizeof(sampl_t); s->async->buf_int_count += sizeof(sampl_t); - if((++s->async->cur_chan) >= s->async->cur_chanlist_len) { /* one scan done */ + if((++s->async->cur_chan) >= s->async->cmd.chanlist_len) { /* one scan done */ s->async->cur_chan = 0; comedi_eos(dev, s); } diff --git a/comedi/drivers/ni_mio_common.c b/comedi/drivers/ni_mio_common.c index ce35427b..f5dd58ab 100644 --- a/comedi/drivers/ni_mio_common.c +++ b/comedi/drivers/ni_mio_common.c @@ -582,7 +582,7 @@ static void ni_ai_fifo_read(comedi_device *dev,comedi_subdevice *s, d+=devpriv->ai_xorlist[j]; data[i]=d; j++; - if(j>=async->cur_chanlist_len){ + if(j>=async->cmd.chanlist_len){ j=0; async->events |= COMEDI_CB_EOS; } @@ -652,7 +652,7 @@ static void ni_handle_fifo_dregs(comedi_device *dev) d+=devpriv->ai_xorlist[j]; *data=d; j++; - if(j>=s->async->cur_chanlist_len){ + if(j>=s->async->cmd.chanlist_len){ j=0; //s->events |= COMEDI_CB_EOS; } @@ -681,7 +681,7 @@ static void ni_munge(comedi_device *dev,comedi_subdevice *s,sampl_t *start, for(i=start;iai_xorlist[j]; j++; - if(j>=async->cur_chanlist_len)j=0; + if(j>=async->cmd.chanlist_len)j=0; } async->cur_chan=j; } diff --git a/comedi/drivers/pcl812.c b/comedi/drivers/pcl812.c index 5521a791..0191211c 100644 --- a/comedi/drivers/pcl812.c +++ b/comedi/drivers/pcl812.c @@ -903,7 +903,7 @@ static void interrupt_pcl812_ai_int(int irq, void *d, struct pt_regs *regs) s->async->buf_int_count+=sizeof(sampl_t); s->async->cur_chan++; - if (s->async->cur_chan >= s->async->cur_chanlist_len) { /* one scan done */ + if (s->async->cur_chan >= s->async->cmd.chanlist_len) { /* one scan done */ s->async->cur_chan=0; devpriv->ai_act_scan++; if (devpriv->ai_eos) @@ -939,7 +939,7 @@ static void transfer_from_dma_buf(comedi_device *dev,comedi_subdevice *s, s->async->buf_int_count+=sizeof(sampl_t); s->async->cur_chan++; - if(s->async->cur_chan>=s->async->cur_chanlist_len){ + if(s->async->cur_chan>=s->async->cmd.chanlist_len){ s->async->cur_chan=0; devpriv->ai_act_scan++; if (devpriv->ai_eos) diff --git a/comedi/drivers/pcl818.c b/comedi/drivers/pcl818.c index 6a0f31c0..85080de1 100644 --- a/comedi/drivers/pcl818.c +++ b/comedi/drivers/pcl818.c @@ -519,7 +519,7 @@ conv_finish: s->async->buf_int_count+=sizeof(sampl_t); s->async->cur_chan++; - if (s->async->cur_chan>=s->async->cur_chanlist_len){ + if (s->async->cur_chan>=s->async->cmd.chanlist_len){ s->async->cur_chan=0; #if 0 if (devpriv->cur_flags & TRIG_WAKE_EOS){ @@ -597,7 +597,7 @@ static void interrupt_pcl818_ai_mode13_dma(int irq, void *d, struct pt_regs *reg devpriv->act_chanlist_pos++; s->async->cur_chan++; - if(s->async->cur_chan>=s->async->cur_chanlist_len){ + if(s->async->cur_chan>=s->async->cmd.chanlist_len){ s->async->cur_chan=0; } @@ -683,7 +683,7 @@ static void interrupt_pcl818_ai_mode13_dma_rtc(int irq, void *d, struct pt_regs s->async->buf_int_count+=sizeof(sampl_t); s->async->cur_chan++; - if(s->async->cur_chan>=s->async->cur_chanlist_len){ + if(s->async->cur_chan>=s->async->cmd.chanlist_len){ s->async->cur_chan++; devpriv->int13_act_scan--; } @@ -763,7 +763,7 @@ static void interrupt_pcl818_ai_mode13_fifo(int irq, void *d, struct pt_regs *re s->async->buf_int_count+=sizeof(sampl_t); s->async->cur_chan++; - if(s->async->cur_chan>=s->async->cur_chanlist_len){ + if(s->async->cur_chan>=s->async->cmd.chanlist_len){ s->async->cur_chan = 0; devpriv->int13_act_scan--; } diff --git a/comedi/kcomedilib/kcomedilib_main.c b/comedi/kcomedilib/kcomedilib_main.c index 1f2b2299..5016a324 100644 --- a/comedi/kcomedilib/kcomedilib_main.c +++ b/comedi/kcomedilib/kcomedilib_main.c @@ -399,7 +399,6 @@ int comedi_command(unsigned int minor,comedi_cmd *cmd) async->data = cmd->data; async->data_len = cmd->data_len; async->cur_chan = 0; - async->cur_chanlist_len = cmd->chanlist_len; return s->do_cmd(dev,s); } diff --git a/include/linux/comedidev.h b/include/linux/comedidev.h index bf229398..49756ffe 100644 --- a/include/linux/comedidev.h +++ b/include/linux/comedidev.h @@ -114,7 +114,6 @@ struct comedi_async_struct{ volatile unsigned int buf_int_count; /* byte count for interrupt */ unsigned int buf_user_count; /* byte count for read() and write() */ unsigned int cur_chan; /* useless channel marker for interrupt */ - unsigned int cur_chanlist_len; void *data; unsigned int data_len; @@ -288,7 +287,7 @@ static inline void comedi_buf_put(comedi_async *async, sampl_t x) async->buf_int_ptr = 0; async->events |= COMEDI_CB_EOBUF; } - if(++async->cur_chan >= async->cur_chanlist_len){ + if(++async->cur_chan >= async->cmd.chanlist_len){ async->cur_chan = 0; async->events |= COMEDI_CB_EOS; } @@ -308,7 +307,7 @@ static inline int comedi_buf_get(comedi_async *async, sampl_t *x) async->buf_int_ptr = 0; async->events |= COMEDI_CB_EOBUF; } - if(++async->cur_chan >= async->cur_chanlist_len){ + if(++async->cur_chan >= async->cmd.chanlist_len){ async->cur_chan = 0; async->events |= COMEDI_CB_EOS; }