Commit 1f270682 authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

staging: comedi: adv_pci1710: remove 'ai_chanlist' from private data

This member of the private data is just a copy of the cmd->chanlist.
Use that instead.
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 4d486e75
...@@ -316,7 +316,6 @@ struct pci1710_private { ...@@ -316,7 +316,6 @@ struct pci1710_private {
unsigned char da_ranges; /* copy of D/A outpit range register */ unsigned char da_ranges; /* copy of D/A outpit range register */
unsigned int ai_scans; /* len of scanlist */ unsigned int ai_scans; /* len of scanlist */
unsigned int ai_n_chan; /* how many channels is measured */ unsigned int ai_n_chan; /* how many channels is measured */
unsigned int *ai_chanlist; /* actaul chanlist */
unsigned int ai_data_len; /* len of data buffer */ unsigned int ai_data_len; /* len of data buffer */
unsigned short ao_data[4]; /* data output buffer */ unsigned short ao_data[4]; /* data output buffer */
unsigned int cnt0_write_wait; /* after a write, wait for update of the unsigned int cnt0_write_wait; /* after a write, wait for update of the
...@@ -961,11 +960,11 @@ static int pci171x_ai_docmd_and_mode(int mode, struct comedi_device *dev, ...@@ -961,11 +960,11 @@ static int pci171x_ai_docmd_and_mode(int mode, struct comedi_device *dev,
start_pacer(dev, -1, 0, 0); /* stop pacer */ start_pacer(dev, -1, 0, 0); /* stop pacer */
seglen = check_channel_list(dev, s, devpriv->ai_chanlist, seglen = check_channel_list(dev, s, cmd->chanlist,
devpriv->ai_n_chan); devpriv->ai_n_chan);
if (seglen < 1) if (seglen < 1)
return -EINVAL; return -EINVAL;
setup_channel_list(dev, s, devpriv->ai_chanlist, setup_channel_list(dev, s, cmd->chanlist,
devpriv->ai_n_chan, seglen); devpriv->ai_n_chan, seglen);
outb(0, dev->iobase + PCI171x_CLRFIFO); outb(0, dev->iobase + PCI171x_CLRFIFO);
...@@ -1120,7 +1119,6 @@ static int pci171x_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s) ...@@ -1120,7 +1119,6 @@ static int pci171x_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
struct comedi_cmd *cmd = &s->async->cmd; struct comedi_cmd *cmd = &s->async->cmd;
devpriv->ai_n_chan = cmd->chanlist_len; devpriv->ai_n_chan = cmd->chanlist_len;
devpriv->ai_chanlist = cmd->chanlist;
devpriv->ai_data_len = s->async->prealloc_bufsz; devpriv->ai_data_len = s->async->prealloc_bufsz;
if (cmd->stop_src == TRIG_COUNT) if (cmd->stop_src == TRIG_COUNT)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment