From: H Hartley Sweeten Date: Mon, 17 Feb 2014 21:27:24 +0000 (-0700) Subject: staging: comedi: pcl816: remove 'ai_n_chan' from private data X-Git-Tag: firefly_0821_release~176^2~4193^2~958 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=91471f9b45d5c36aa50c0940dfaf64fb13cf4fe5;p=firefly-linux-kernel-4.4.55.git 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 Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- 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;