int count)
{
struct rtd_private *devpriv = dev->private;
+ struct comedi_async *async = s->async;
+ struct comedi_cmd *cmd = &async->cmd;
int ii;
for (ii = 0; ii < count; ii++) {
d = readw(devpriv->las1 + LAS1_ADC_FIFO);
d = d >> 3; /* low 3 bits are marker lines */
- if (test_bit(s->async->cur_chan, devpriv->chan_is_bipolar))
+ if (test_bit(async->cur_chan, devpriv->chan_is_bipolar))
/* convert to comedi unsigned data */
d = comedi_offset_munge(s, d);
d &= s->maxdata;
if (!comedi_buf_write_samples(s, &d, 1))
return -1;
+ async->cur_chan++;
+ async->cur_chan %= cmd->chanlist_len;
+
if (devpriv->ai_count > 0) /* < 0, means read forever */
devpriv->ai_count--;
}