Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 91471f9b authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman
Browse files

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: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent dbdd7737
Loading
Loading
Loading
Loading
+2 −4
Original line number Diff line number Diff line
@@ -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;