removed async.cur_chanlist_len
authorFrank Mori Hess <fmhess@speakeasy.net>
Thu, 22 Nov 2001 01:09:56 +0000 (01:09 +0000)
committerFrank Mori Hess <fmhess@speakeasy.net>
Thu, 22 Nov 2001 01:09:56 +0000 (01:09 +0000)
comedi/comedi_fops.c
comedi/drivers/ni_atmio16d.c
comedi/drivers/ni_mio_common.c
comedi/drivers/pcl812.c
comedi/drivers/pcl818.c
comedi/kcomedilib/kcomedilib_main.c
include/linux/comedidev.h

index 3289df9cf2904f1019774f78001e7ec7e1d6a1a7..282ffc1afdc72efce1f7653bec5c684431c91efa 100644 (file)
@@ -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){
index 4943c0c70cbd8dbf10814df801947f869522de33..c87c6d4878ef6133ff530c723b132c55fc46a44b 100644 (file)
@@ -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);
        }
index ce35427bcc795fc258756416ae6f19c23d26be0b..f5dd58ab14f446dfa1264d8e518e1c3f0143c158 100644 (file)
@@ -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;i<stop;i++){
                *i +=devpriv->ai_xorlist[j];
                j++;
-               if(j>=async->cur_chanlist_len)j=0;
+               if(j>=async->cmd.chanlist_len)j=0;
        }
        async->cur_chan=j;
 }
index 5521a7915d0c7356d1207101d938660ee69f293e..0191211c65985b9134cfc9b1e58fa3aa21f4e3af 100644 (file)
@@ -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)
index 6a0f31c01f02222fcd530427a47e0c9baa29d4c3..85080de1377d452b897b8642ccb61b4777e3e07c 100644 (file)
@@ -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--;
                }
index 1f2b22996d1faacdb2642cc9d6d23a51e1a5f53f..5016a3249487259c310aaaaedbaa2a07a6bdba1a 100644 (file)
@@ -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);
 }
index bf229398d7f0577b6c81ef7840a8eec191372365..49756ffeb815616cdda59da7a3bd442d30990b0a 100644 (file)
@@ -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;
        }