staging: comedi: pcl816: remove 'sub_ai' from private data
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Tue, 3 Dec 2013 19:07:13 +0000 (12:07 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Dec 2013 23:25:30 +0000 (15:25 -0800)
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: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/pcl816.c

index ed4d57f8a1bd5dc60bdbeac64b8bcd49d8cd8aae..6445e1fe4e5ebdfdce8c00aea127380690b87841 100644 (file)
@@ -138,7 +138,6 @@ struct pcl816_private {
        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 */
-       struct comedi_subdevice *sub_ai;        /*  ptr to AI subdevice */
 };
 
 /*
@@ -948,7 +947,6 @@ no_dma:
        s = &dev->subdevices[0];
        if (board->n_aichan > 0) {
                s->type = COMEDI_SUBD_AI;
-               devpriv->sub_ai = s;
                s->subdev_flags = SDF_CMD_READ | SDF_DIFF;
                s->n_chan = board->n_aichan;
                s->maxdata = board->ai_maxdata;
@@ -1003,7 +1001,7 @@ static void pcl816_detach(struct comedi_device *dev)
        struct pcl816_private *devpriv = dev->private;
 
        if (dev->private) {
-               pcl816_ai_cancel(dev, devpriv->sub_ai);
+               pcl816_ai_cancel(dev, dev->read_subdev);
                pcl816_reset(dev);
                if (devpriv->dma)
                        free_dma(devpriv->dma);