staging: comedi: ni_65xx: use dev->read_subdev
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Thu, 5 Dec 2013 20:43:45 +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_65xx.c

index effa12482c8d4bc1012282918ac2a74a6e0f3c74..6e42001f686e3906ff288a73618b12fff59a6e7a 100644 (file)
@@ -427,7 +427,7 @@ static irqreturn_t ni_65xx_interrupt(int irq, void *d)
 {
        struct comedi_device *dev = d;
        struct ni_65xx_private *devpriv = dev->private;
-       struct comedi_subdevice *s = &dev->subdevices[2];
+       struct comedi_subdevice *s = dev->read_subdev;
        unsigned int status;
 
        status = readb(devpriv->mite->daq_io_addr + Change_Status);