staging: comedi: pcl818: remove 'sub_ai' from private data
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Tue, 3 Dec 2013 19:07:19 +0000 (12:07 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Dec 2013 23:25:31 +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/pcl818.c

index ad1f347066435b96cc472e24202a5eb9e022efd0..fb9141274e19a0e0a32a6a4f6c20bc2e4f2de5c3 100644 (file)
@@ -290,7 +290,6 @@ struct pcl818_private {
        unsigned int ai_data_len;       /*  len of data buffer */
        unsigned int ai_timer1; /*  timers */
        unsigned int ai_timer2;
-       struct comedi_subdevice *sub_ai;        /*  ptr to AI subdevice */
        unsigned char usefifo;  /*  1=use fifo */
        unsigned int ao_readback[2];
 };
@@ -1269,7 +1268,6 @@ no_dma:
                s->type = COMEDI_SUBD_UNUSED;
        } else {
                s->type = COMEDI_SUBD_AI;
-               devpriv->sub_ai = s;
                s->subdev_flags = SDF_READABLE;
                if (check_single_ended(dev->iobase)) {
                        s->n_chan = board->n_aichan_se;
@@ -1403,7 +1401,7 @@ static void pcl818_detach(struct comedi_device *dev)
        struct pcl818_private *devpriv = dev->private;
 
        if (devpriv) {
-               pcl818_ai_cancel(dev, devpriv->sub_ai);
+               pcl818_ai_cancel(dev, dev->read_subdev);
                pcl818_reset(dev);
                if (devpriv->dma)
                        free_dma(devpriv->dma);