diff options
author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2014-02-17 14:27:24 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-02-18 11:55:31 -0800 |
commit | 91471f9b45d5c36aa50c0940dfaf64fb13cf4fe5 (patch) | |
tree | 02cbb4a37ea9403d2d752c6665123e8dbfdbc710 | |
parent | dbdd7737e8f5401dad89e71256396bdb9df7266a (diff) |
staging: comedi: pcl816: remove 'ai_n_chan' from private data
This member of the private data is just a copy of the cmd->chanlist_len.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/comedi/drivers/pcl816.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/staging/comedi/drivers/pcl816.c b/drivers/staging/comedi/drivers/pcl816.c index 042b4c372bfb..77bf99698144 100644 --- a/drivers/staging/comedi/drivers/pcl816.c +++ b/drivers/staging/comedi/drivers/pcl816.c @@ -140,7 +140,6 @@ 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 */ }; @@ -260,7 +259,7 @@ static irqreturn_t interrupt_pcl816_ai_mode13_int(int irq, void *d) devpriv->ai_act_chanlist_pos = 0; s->async->cur_chan++; - if (s->async->cur_chan >= devpriv->ai_n_chan) { + if (s->async->cur_chan >= cmd->chanlist_len) { s->async->cur_chan = 0; devpriv->ai_act_scan++; } @@ -301,7 +300,7 @@ static void transfer_from_dma_buf(struct comedi_device *dev, } s->async->cur_chan++; - if (s->async->cur_chan >= devpriv->ai_n_chan) { + if (s->async->cur_chan >= cmd->chanlist_len) { s->async->cur_chan = 0; devpriv->ai_act_scan++; } @@ -520,7 +519,6 @@ static int pcl816_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s) setup_channel_list(dev, s, cmd->chanlist, seglen); udelay(1); - devpriv->ai_n_chan = cmd->chanlist_len; devpriv->ai_act_scan = 0; s->async->cur_chan = 0; devpriv->irq_blocked = 1; |