Commit 5d6f1a2e authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

staging: comedi: pcl816: remove 'sub_ai' from private data

This member of the private data is a duplicate of the comedi_device
'read_subdev' member. Remove the private data member and use the
comedi_device member instead.
Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 109b4d00
...@@ -138,7 +138,6 @@ struct pcl816_private { ...@@ -138,7 +138,6 @@ struct pcl816_private {
unsigned int ai_act_chanlist_pos; /* actual position in 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_n_chan; /* how many channels per scan */
unsigned int ai_poll_ptr; /* how many sampes transfer poll */ unsigned int ai_poll_ptr; /* how many sampes transfer poll */
struct comedi_subdevice *sub_ai; /* ptr to AI subdevice */
}; };
/* /*
...@@ -948,7 +947,6 @@ static int pcl816_attach(struct comedi_device *dev, struct comedi_devconfig *it) ...@@ -948,7 +947,6 @@ static int pcl816_attach(struct comedi_device *dev, struct comedi_devconfig *it)
s = &dev->subdevices[0]; s = &dev->subdevices[0];
if (board->n_aichan > 0) { if (board->n_aichan > 0) {
s->type = COMEDI_SUBD_AI; s->type = COMEDI_SUBD_AI;
devpriv->sub_ai = s;
s->subdev_flags = SDF_CMD_READ | SDF_DIFF; s->subdev_flags = SDF_CMD_READ | SDF_DIFF;
s->n_chan = board->n_aichan; s->n_chan = board->n_aichan;
s->maxdata = board->ai_maxdata; s->maxdata = board->ai_maxdata;
...@@ -1003,7 +1001,7 @@ static void pcl816_detach(struct comedi_device *dev) ...@@ -1003,7 +1001,7 @@ static void pcl816_detach(struct comedi_device *dev)
struct pcl816_private *devpriv = dev->private; struct pcl816_private *devpriv = dev->private;
if (dev->private) { if (dev->private) {
pcl816_ai_cancel(dev, devpriv->sub_ai); pcl816_ai_cancel(dev, dev->read_subdev);
pcl816_reset(dev); pcl816_reset(dev);
if (devpriv->dma) if (devpriv->dma)
free_dma(devpriv->dma); free_dma(devpriv->dma);
......
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