Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 186672
b: refs/heads/master
c: b3559cb
h: refs/heads/master
v: v3
  • Loading branch information
Ian Abbott authored and Greg Kroah-Hartman committed Mar 4, 2010
1 parent 182d3ed commit 2bbdd1d
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 13de4f000ec491b16a820e4ed59de2c98b7807be
refs/heads/master: b3559cb1aa5f863e1ce9b94b518be7ddf6680e45
31 changes: 27 additions & 4 deletions trunk/drivers/staging/comedi/drivers/pcl818.c
Original file line number Diff line number Diff line change
Expand Up @@ -557,8 +557,14 @@ static irqreturn_t interrupt_pcl818_ai_mode13_int(int irq, void *d)
comedi_event(dev, s);
return IRQ_HANDLED;
}
if (s->async->cur_chan == 0) {
devpriv->act_chanlist_pos++;
if (devpriv->act_chanlist_pos >= devpriv->act_chanlist_len) {
devpriv->act_chanlist_pos = 0;
}
s->async->cur_chan++;
if (s->async->cur_chan >= devpriv->ai_n_chan) {
/* printk("E"); */
s->async->cur_chan = 0;
devpriv->ai_act_scan--;
}

Expand Down Expand Up @@ -627,9 +633,13 @@ static irqreturn_t interrupt_pcl818_ai_mode13_dma(int irq, void *d)

devpriv->act_chanlist_pos++;
if (devpriv->act_chanlist_pos >= devpriv->act_chanlist_len) {
devpriv->ai_act_scan--;
devpriv->act_chanlist_pos = 0;
}
s->async->cur_chan++;
if (s->async->cur_chan >= devpriv->ai_n_chan) {
s->async->cur_chan = 0;
devpriv->ai_act_scan--;
}

if (!devpriv->neverending_ai)
if (devpriv->ai_act_scan == 0) { /* all data sampled */
Expand Down Expand Up @@ -717,7 +727,14 @@ static irqreturn_t interrupt_pcl818_ai_mode13_dma_rtc(int irq, void *d)
comedi_buf_put(s->async, dmabuf[bufptr++] >> 4); /* get one sample */
bufptr &= (devpriv->dmasamplsize - 1);

if (s->async->cur_chan == 0) {
devpriv->act_chanlist_pos++;
if (devpriv->act_chanlist_pos >=
devpriv->act_chanlist_len) {
devpriv->act_chanlist_pos = 0;
}
s->async->cur_chan++;
if (s->async->cur_chan >= devpriv->ai_n_chan) {
s->async->cur_chan = 0;
devpriv->ai_act_scan--;
}

Expand Down Expand Up @@ -796,7 +813,13 @@ static irqreturn_t interrupt_pcl818_ai_mode13_fifo(int irq, void *d)

comedi_buf_put(s->async, (lo >> 4) | (inb(dev->iobase + PCL818_FI_DATAHI) << 4)); /* get one sample */

if (s->async->cur_chan == 0) {
devpriv->act_chanlist_pos++;
if (devpriv->act_chanlist_pos >= devpriv->act_chanlist_len) {
devpriv->act_chanlist_pos = 0;
}
s->async->cur_chan++;
if (s->async->cur_chan >= devpriv->ai_n_chan) {
s->async->cur_chan = 0;
devpriv->ai_act_scan--;
}

Expand Down

0 comments on commit 2bbdd1d

Please sign in to comment.