staging: comedi: ni_pcidio: use dev->read_subdev
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Thu, 5 Dec 2013 20:43:49 +0000 (13:43 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Dec 2013 21:07:17 +0000 (13:07 -0800)
Use the dev->read_subdev that was setup in the device attach instead
of accessing the dev->subdevices array directly.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/ni_pcidio.c

index ef72fc79523ef5bb29765b8efdfd41b5b7eaea11..30c46a3c1767dbc38d4fc844cb8b68fb8b4045c6 100644 (file)
@@ -384,7 +384,7 @@ static irqreturn_t nidio_interrupt(int irq, void *d)
 {
        struct comedi_device *dev = d;
        struct nidio96_private *devpriv = dev->private;
-       struct comedi_subdevice *s = &dev->subdevices[0];
+       struct comedi_subdevice *s = dev->read_subdev;
        struct comedi_async *async = s->async;
        struct mite_struct *mite = devpriv->mite;