fix use of cmd->data
authorDavid Schleef <ds@schleef.org>
Sat, 17 Mar 2001 03:56:09 +0000 (03:56 +0000)
committerDavid Schleef <ds@schleef.org>
Sat, 17 Mar 2001 03:56:09 +0000 (03:56 +0000)
comedi/drivers/adl_pci9118.c
comedi/drivers/cb_pcidas.c
comedi/drivers/check_driver
comedi/drivers/das1800.c
comedi/drivers/das800.c

index b0aa82a343965d356fc4263a38b5d935867746b7..31bf1ef837e1f880fb3e8a0a0310f4c88aa9ca58 100644 (file)
@@ -1016,8 +1016,8 @@ static int pci9118_ai_cmd(comedi_device *dev,comedi_subdevice *s)
        devpriv->ai1234_flags=cmd->flags;
        devpriv->ai1234_n_chan=cmd->chanlist_len;
        devpriv->ai1234_chanlist=cmd->chanlist;
-       devpriv->ai1234_data=cmd->data;
-       devpriv->ai1234_data_len=cmd->data_len;
+       devpriv->ai1234_data=s->async->data;
+       devpriv->ai1234_data_len=s->async->data_len;
        if (cmd->stop_arg==TRIG_COUNT) { devpriv->ai1234_scans=cmd->stop_arg; }
                                else   { devpriv->ai1234_scans=0; }
        devpriv->ai1234_timer1=0;
index ee07cf33110d7ef91b37d0785a97de694507279e..07d66c493e10e847349789a3c3eedcccfb366331 100644 (file)
@@ -458,7 +458,6 @@ static int cb_pcidas_ai_cmd(comedi_device *dev,comedi_subdevice *s)
        printk("stop_src: %d\n", cmd->stop_src);
        printk("stop_arg: %d\n", cmd->stop_arg);
        printk("chanlist_len: %d\n", cmd->chanlist_len);
-       printk("data_len: %d\n", cmd->data_len);
 }
 */
 
index 9af55e720a6480e19387cd99099e4031f248a4ad..ec7a76839c17c95ed898fb385941a1215269c904 100755 (executable)
@@ -183,11 +183,11 @@ if grep -E 'cmd..?data' ${driver} &>/dev/null;then
        echo "E: uses cmd->data or cmd->data_len"
 fi
 
-if grep -E 'buf_int_ptr++' ${driver} &>/dev/null;then
+if grep 'buf_int_ptr++' ${driver} &>/dev/null;then
        echo "E: uses buf_int_ptr++"
 fi
 
-if grep -E 'buf_int_count++' ${driver} &>/dev/null;then
+if grep 'buf_int_count++' ${driver} &>/dev/null;then
        echo "E: uses buf_int_count++"
 fi
 
index aa69a31f11d40f853c361d9289e1f41536061805..81cf3bdd2fe013f223e30324617f98ac9abda75f 100644 (file)
@@ -1054,12 +1054,12 @@ static void das1800_handle_fifo_not_empty(comedi_device *dev, comedi_subdevice *
 /* utility function used by das1800 interrupt service routines */
 inline void write_to_buffer(comedi_device *dev, comedi_subdevice *s, sampl_t data_point)
 {
-       if(s->async->buf_int_ptr >= s->async->cmd.data_len )
+       if(s->async->buf_int_ptr >= s->async->data_len )
        {
                s->async->buf_int_ptr = 0;
                comedi_eobuf(dev, s);
        }
-       *((sampl_t *)((void *)s->async->cmd.data + s->async->buf_int_ptr)) = data_point;
+       *((sampl_t *)((void *)s->async->data + s->async->buf_int_ptr)) = data_point;
        s->async->cur_chan++;
        if(s->async->cur_chan >= s->async->cur_chanlist_len)
        {
index b93a318d613e8e3631e4a7c55ebe41f28dd98365..652a9a4f79a2c64da7cc530c873a5600de1933a9 100644 (file)
@@ -344,12 +344,12 @@ static void das800_interrupt(int irq, void *d, struct pt_regs *regs)
                if(devpriv->count > 0 || devpriv->forever == 1)
                {
                        /* write data point to buffer */
-                       if(async->buf_int_ptr >= async->cmd.data_len )
+                       if(async->buf_int_ptr >= async->data_len )
                        {
                                async->buf_int_ptr = 0;
                                comedi_eobuf(dev, s);
                        }
-                       *((sampl_t *)((void *)async->cmd.data + async->buf_int_ptr)) = dataPoint;
+                       *((sampl_t *)((void *)async->data + async->buf_int_ptr)) = dataPoint;
                        async->cur_chan++;
                        if( async->cur_chan >= async->cur_chanlist_len )
                        {