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

index eaf21ce37ed5f2fa3c8b5182b1e9f0b51be92689..31734e1142fd310e3aaedb73eaf25469b62f1b6b 100644 (file)
@@ -356,7 +356,7 @@ static int pc236_intr_cancel(struct comedi_device *dev,
 static irqreturn_t pc236_interrupt(int irq, void *d)
 {
        struct comedi_device *dev = d;
-       struct comedi_subdevice *s = &dev->subdevices[1];
+       struct comedi_subdevice *s = dev->read_subdev;
        int handled;
 
        handled = pc236_intr_check(dev);