Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 186671
b: refs/heads/master
c: 13de4f0
h: refs/heads/master
i:
  186669: e97c59c
  186667: 28e1bcf
  186663: e126401
  186655: aecd6cc
v: v3
  • Loading branch information
Ian Abbott authored and Greg Kroah-Hartman committed Mar 4, 2010
1 parent 8c3f7de commit 182d3ed
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 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: 7edfa10689615255e65909bb893fd8f8620cff92
refs/heads/master: 13de4f000ec491b16a820e4ed59de2c98b7807be
11 changes: 10 additions & 1 deletion trunk/drivers/staging/comedi/drivers/pcl816.c
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ struct pcl816_private {
unsigned int ai_act_chanlist[16]; /* MUX setting for actual AI operations */
unsigned int ai_act_chanlist_len; /* how long is actual MUX list */
unsigned int ai_act_chanlist_pos; /* actual position in MUX list */
unsigned int ai_n_chan; /* how many channels per scan */
unsigned int ai_poll_ptr; /* how many sampes transfer poll */
struct comedi_subdevice *sub_ai; /* ptr to AI subdevice */
#ifdef unused
Expand Down Expand Up @@ -320,7 +321,9 @@ static irqreturn_t interrupt_pcl816_ai_mode13_int(int irq, void *d)
if (++devpriv->ai_act_chanlist_pos >= devpriv->ai_act_chanlist_len)
devpriv->ai_act_chanlist_pos = 0;

if (s->async->cur_chan == 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 @@ -353,6 +356,11 @@ static void transfer_from_dma_buf(struct comedi_device *dev,
if (++devpriv->ai_act_chanlist_pos >=
devpriv->ai_act_chanlist_len) {
devpriv->ai_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 @@ -647,6 +655,7 @@ static int pcl816_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
return -EINVAL;
udelay(1);

devpriv->ai_n_chan = cmd->chanlist_len;
devpriv->ai_act_scan = 0;
s->async->cur_chan = 0;
devpriv->irq_blocked = 1;
Expand Down

0 comments on commit 182d3ed

Please sign in to comment.