staging: comedi: comedi_parport: use dev->read_subdev in interrupt handler
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Fri, 30 Aug 2013 18:48:44 +0000 (11:48 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 17 Sep 2013 14:47:43 +0000 (07:47 -0700)
Use the dev->read_subdev to get the comedi_subdevice 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/comedi_parport.c

index 724d9a7cd1cdbc66ab4885155c36904d6be68d8f..d164243a09f7f2c142e4a3c758e6b3c24f5e47e1 100644 (file)
@@ -222,7 +222,7 @@ static int parport_intr_cancel(struct comedi_device *dev,
 static irqreturn_t parport_interrupt(int irq, void *d)
 {
        struct comedi_device *dev = d;
-       struct comedi_subdevice *s = &dev->subdevices[3];
+       struct comedi_subdevice *s = dev->read_subdev;
        unsigned int ctrl;
 
        ctrl = inb(dev->iobase + PARPORT_CTRL_REG);